fixed spawn reason check for Iron Golem spawning logic in NaturalIronGolemSpawnEvent

This commit is contained in:
2025-10-12 23:05:19 +02:00
parent 53fca580f3
commit 4be3e528b1

View File

@@ -9,7 +9,7 @@ class NaturalIronGolemSpawnEvent extends ApplianceListener<IronGolemAnimation> {
@EventHandler
public void onGolemSpawn(CreatureSpawnEvent event) {
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);
}
}