@@ -2,7 +2,7 @@
|
||||
+++ b/net/minecraft/server/EntityTypes.java
|
||||
@@ -121,7 +121,7 @@
|
||||
public static <T extends Entity> EntityTypes<T> a(String s, EntityTypes.a<T> entitytypes_a) {
|
||||
EntityTypes entitytypes = entitytypes_a.a(s);
|
||||
EntityTypes<T> entitytypes = entitytypes_a.a(s);
|
||||
|
||||
- IRegistry.ENTITY_TYPE.a(new MinecraftKey(s), (Object) entitytypes);
|
||||
+ IRegistry.ENTITY_TYPE.a(new MinecraftKey(s), entitytypes); // CraftBukkit - decompile error
|
||||
@@ -19,24 +19,15 @@
|
||||
+
|
||||
+ @Nullable
|
||||
+ public T spawnCreature(World world, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
Entity entity = this.b(world, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, flag, flag1);
|
||||
T t0 = this.b(world, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, flag, flag1);
|
||||
|
||||
- world.addEntity(entity);
|
||||
- return entity;
|
||||
+ return world.addEntity(entity, spawnReason) ? (T) entity : null; // Don't return an entity when CreatureSpawnEvent is canceled
|
||||
- world.addEntity(t0);
|
||||
- return t0;
|
||||
+ return world.addEntity(t0, spawnReason) ? t0 : null; // Don't return an entity when CreatureSpawnEvent is canceled
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -187,7 +193,7 @@
|
||||
}
|
||||
|
||||
a(world, entityhuman, entity, nbttagcompound);
|
||||
- return entity;
|
||||
+ return (T) entity; // CraftBukkit - decompile error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +256,7 @@
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user