fixed spawn reason check for Iron Golem spawning logic in NaturalIronGolemSpawnEvent
This commit is contained in:
@@ -9,7 +9,7 @@ class NaturalIronGolemSpawnEvent extends ApplianceListener<IronGolemAnimation> {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onGolemSpawn(CreatureSpawnEvent event) {
|
public void onGolemSpawn(CreatureSpawnEvent event) {
|
||||||
if(!(event.getEntity() instanceof IronGolem golem)) return;
|
if(!(event.getEntity() instanceof IronGolem golem)) return;
|
||||||
// if(event.getSpawnReason() != CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE) return;
|
if(event.getSpawnReason() != CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE) return;
|
||||||
this.getAppliance().onGolemSpawn(golem);
|
this.getAppliance().onGolemSpawn(golem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user