We only care about sand & gravel.

Technically this was already addressed because no other blocks would
have their place store set to true, but this eliminates unnecessary
overhead caused by the checking of other falling blocks - anvils, dragon
eggs, and TNT.
This commit is contained in:
GJ 2013-01-18 09:37:03 -05:00
parent db1c0647ed
commit 2c78bac8f7

View File

@ -60,7 +60,9 @@ public class EntityListener implements Listener {
if (entity instanceof FallingBlock) {
int entityID = entity.getEntityId();
Block block = event.getBlock();
Material type = block.getType();
if (type == Material.SAND || type == Material.GRAVEL) {
if (mcMMO.placeStore.isTrue(block)) {
plugin.addToFallingBlockTracker(entityID, block);
}
@ -72,6 +74,7 @@ public class EntityListener implements Listener {
}
}
}
}
/**
* Monitor EntityDamageByEntity events.