mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-27 10:01:37 +01:00
Fix handling of unknown biomes (For Trees++)
This commit is contained in:
parent
8546b2205e
commit
0707953718
@ -825,6 +825,7 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
return;
|
||||
Block b = event.getBlock();
|
||||
Material m = b.getType();
|
||||
if(m == null) return;
|
||||
switch(m) {
|
||||
case STATIONARY_WATER:
|
||||
case WATER:
|
||||
@ -832,7 +833,7 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
case LAVA:
|
||||
case GRAVEL:
|
||||
case SAND:
|
||||
checkBlock(event.getBlock(), "blockphysics");
|
||||
checkBlock(b, "blockphysics");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -847,12 +848,14 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
public void onBlockFromTo(BlockFromToEvent event) {
|
||||
if(event.isCancelled())
|
||||
return;
|
||||
Material m = event.getBlock().getType();
|
||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE))
|
||||
checkBlock(event.getBlock(), "blockfromto");
|
||||
m = event.getToBlock().getType();
|
||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE))
|
||||
checkBlock(event.getToBlock(), "blockfromto");
|
||||
Block b = event.getBlock();
|
||||
Material m = b.getType();
|
||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE) && (m != null))
|
||||
checkBlock(b, "blockfromto");
|
||||
b = event.getToBlock();
|
||||
m = b.getType();
|
||||
if((m != Material.WOOD_PLATE) && (m != Material.STONE_PLATE) && (m != null))
|
||||
checkBlock(b, "blockfromto");
|
||||
}
|
||||
};
|
||||
pm.registerEvents(fromtolistener, this);
|
||||
|
@ -1060,6 +1060,9 @@ public class NewMapChunkCache implements MapChunkCache {
|
||||
Biome[] b = Biome.values();
|
||||
BiomeMap[] bm = BiomeMap.values();
|
||||
biome_to_bmap = new BiomeMap[b.length];
|
||||
for(int i = 0; i < b.length; i++) {
|
||||
biome_to_bmap[i] = BiomeMap.NULL;
|
||||
}
|
||||
for(int i = 0; i < b.length; i++) {
|
||||
String bs = b[i].toString();
|
||||
for(int j = 0; j < bm.length; j++) {
|
||||
|
Loading…
Reference in New Issue
Block a user