Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 05:20:07 +01:00
Improved CreatureSpawnEvent and made Water Animals obey spawn-animals setting.
Dieser Commit ist enthalten in:
Ursprung
baa92bdd06
Commit
f627b69be9
@ -821,6 +821,10 @@ public class World implements IBlockAccess {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entity instanceof EntityLiving && entity instanceof EntityWaterAnimal && !this.allowAnimals) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (!flag && !this.isChunkLoaded(i, j)) {
|
if (!flag && !this.isChunkLoaded(i, j)) {
|
||||||
@ -1934,13 +1938,6 @@ public class World implements IBlockAccess {
|
|||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
entity = (Entity) list.get(i);
|
entity = (Entity) list.get(i);
|
||||||
|
|
||||||
if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) {
|
|
||||||
CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
|
|
||||||
if (event.isCancelled()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.entityList.add(entity);
|
this.entityList.add(entity);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren