Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
SPIGOT-451: Fix bad entities crashing servers when spawned via MobSpawner
Dieser Commit ist enthalten in:
Ursprung
1092acbddf
Commit
e08f5e3d35
@ -1,5 +1,5 @@
|
|||||||
--- ../work/decompile-8eb82bde//net/minecraft/server/MobSpawnerAbstract.java 2014-12-01 10:08:05.390591149 +0000
|
--- ../work/decompile-8eb82bde//net/minecraft/server/MobSpawnerAbstract.java 2015-01-18 01:59:59.240758959 -0600
|
||||||
+++ src/main/java/net/minecraft/server/MobSpawnerAbstract.java 2014-12-01 10:07:23.810591600 +0000
|
+++ src/main/java/net/minecraft/server/MobSpawnerAbstract.java 2015-01-18 01:59:59.244758959 -0600
|
||||||
@@ -4,6 +4,8 @@
|
@@ -4,6 +4,8 @@
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -39,9 +39,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
entity1.mount(entity2);
|
entity1.mount(entity2);
|
||||||
@@ -164,7 +171,7 @@
|
@@ -162,9 +169,9 @@
|
||||||
|
|
||||||
|
entity1 = entity2;
|
||||||
}
|
}
|
||||||
} else if (entity instanceof EntityLiving && entity.world != null && flag) {
|
- } else if (entity instanceof EntityLiving && entity.world != null && flag) {
|
||||||
|
+ } else if (entity instanceof EntityInsentient && entity.world != null && flag) { // CraftBukkit - EntityLiving -> EntityInsentient
|
||||||
((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), (GroupDataEntity) null);
|
((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), (GroupDataEntity) null);
|
||||||
- entity.world.addEntity(entity);
|
- entity.world.addEntity(entity);
|
||||||
+ entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
+ entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren