Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 05:20:05 +01:00
Made iron golems spawning to defend villagers respect spawn-animals. Fixes BUKKIT-1124
Dieser Commit ist enthalten in:
Ursprung
ae6b3711ea
Commit
5c757df673
@ -883,7 +883,7 @@ public class World implements IBlockAccess {
|
|||||||
boolean isAnimal = entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal;
|
boolean isAnimal = entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal;
|
||||||
boolean isMonster = entity instanceof EntityMonster || entity instanceof EntityGhast || entity instanceof EntitySlime;
|
boolean isMonster = entity instanceof EntityMonster || entity instanceof EntityGhast || entity instanceof EntitySlime;
|
||||||
|
|
||||||
if (spawnReason == SpawnReason.NATURAL || spawnReason == SpawnReason.CHUNK_GEN || spawnReason == SpawnReason.JOCKEY || spawnReason == SpawnReason.SPAWNER || spawnReason == SpawnReason.BED || spawnReason == SpawnReason.EGG || spawnReason == SpawnReason.VILLAGE_INVASION) {
|
if (spawnReason == SpawnReason.NATURAL || spawnReason == SpawnReason.CHUNK_GEN || spawnReason == SpawnReason.JOCKEY || spawnReason == SpawnReason.SPAWNER || spawnReason == SpawnReason.BED || spawnReason == SpawnReason.EGG || spawnReason == SpawnReason.VILLAGE_INVASION || spawnReason == SpawnReason.VILLAGE_DEFENSE) {
|
||||||
if (isAnimal && !allowAnimals || isMonster && !allowMonsters) return false;
|
if (isAnimal && !allowAnimals || isMonster && !allowMonsters) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren