Fixed snowman trails being treated as snow fall.

This commit is contained in:
wizjany 2014-01-11 16:08:26 -05:00
parent 4805df2f03
commit 2df3290d38

View File

@ -685,6 +685,16 @@ public void onBlockForm(BlockFormEvent event) {
int type = event.getNewState().getTypeId();
if (event instanceof EntityBlockFormEvent) {
if (((EntityBlockFormEvent) event).getEntity() instanceof Snowman) {
if (wcfg.disableSnowmanTrails) {
event.setCancelled(true);
return;
}
}
return;
}
if (type == BlockID.ICE) {
if (wcfg.disableIceFormation) {
event.setCancelled(true);
@ -718,27 +728,6 @@ public void onBlockForm(BlockFormEvent event) {
}
}
/*
* Called when a block is formed by an entity.
*/
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onEntityBlockForm(EntityBlockFormEvent event) {
ConfigurationManager cfg = plugin.getGlobalStateManager();
WorldConfiguration wcfg = cfg.get(event.getBlock().getWorld());
if (cfg.activityHaltToggle) {
event.setCancelled(true);
return;
}
if (event.getEntity() instanceof Snowman) {
if (wcfg.disableSnowmanTrails) {
event.setCancelled(true);
return;
}
}
}
/*
* Called when a block spreads based on world conditions.
*/