@@ -1,25 +1,25 @@
|
||||
--- a/net/minecraft/server/EntityTypes.java
|
||||
+++ 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<T> entitytypes = entitytypes_a.a(s);
|
||||
@@ -131,7 +131,7 @@
|
||||
private final Type<?> bh;
|
||||
private final EntitySize bi;
|
||||
|
||||
- IRegistry.ENTITY_TYPE.a(new MinecraftKey(s), (Object) entitytypes);
|
||||
+ IRegistry.ENTITY_TYPE.a(new MinecraftKey(s), entitytypes); // CraftBukkit - decompile error
|
||||
return entitytypes;
|
||||
- private static <T extends Entity> EntityTypes<T> a(String s, EntityTypes.a<T> entitytypes_a) {
|
||||
+ private static <T extends Entity> EntityTypes<T> a(String s, EntityTypes.a entitytypes_a) { // CraftBukkit - decompile error
|
||||
return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_a.a(s));
|
||||
}
|
||||
|
||||
@@ -150,10 +150,16 @@
|
||||
@@ -160,10 +160,16 @@
|
||||
|
||||
@Nullable
|
||||
public T a(World world, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, boolean flag, boolean flag1) {
|
||||
public T spawnCreature(World world, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1) {
|
||||
+ // CraftBukkit start
|
||||
+ return spawnCreature(world, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
|
||||
+ return this.spawnCreature(world, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
|
||||
+ }
|
||||
+
|
||||
+ @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) {
|
||||
T t0 = this.b(world, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, flag, flag1);
|
||||
+ public T spawnCreature(World world, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
T t0 = this.b(world, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1);
|
||||
|
||||
- world.addEntity(t0);
|
||||
- return t0;
|
||||
@@ -28,12 +28,31 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -250,7 +256,7 @@
|
||||
@@ -325,7 +331,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public T a(World world) {
|
||||
- return (Entity) this.aT.apply(world);
|
||||
+ return this.aT.apply(world); // CraftBukkit - decompile error
|
||||
return entity;
|
||||
- }).orElse((Object) null);
|
||||
+ }).orElse(null); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static Optional<Entity> b(NBTTagCompound nbttagcompound, World world) {
|
||||
@@ -342,7 +348,8 @@
|
||||
}
|
||||
|
||||
public int getUpdateInterval() {
|
||||
- return this != EntityTypes.PLAYER && this != EntityTypes.EVOKER_FANGS ? (this == EntityTypes.EYE_OF_ENDER ? 4 : (this == EntityTypes.FISHING_BOBBER ? 5 : (this != EntityTypes.SMALL_FIREBALL && this != EntityTypes.DRAGON_FIREBALL && this != EntityTypes.FIREBALL && this != EntityTypes.WITHER_SKULL && this != EntityTypes.SNOWBALL && this != EntityTypes.LLAMA_SPIT && this != EntityTypes.ENDER_PEARL && this != EntityTypes.EGG && this != EntityTypes.POTION && this != EntityTypes.EXPERIENCE_BOTTLE && this != EntityTypes.FIREWORK_ROCKET && this != EntityTypes.TNT ? (this != EntityTypes.ARROW && this != EntityTypes.SPECTRAL_ARROW && this != EntityTypes.TRIDENT && this != EntityTypes.ITEM && this != EntityTypes.FALLING_BLOCK && this != EntityTypes.EXPERIENCE_ORB ? (this != EntityTypes.ITEM_FRAME && this != EntityTypes.LEASH_KNOT && this != EntityTypes.PAINTING && this != EntityTypes.AREA_EFFECT_CLOUD && this != EntityTypes.END_CRYSTAL ? 3 : Integer.MAX_VALUE) : 20) : 10))) : 2;
|
||||
+ // CraftBukkit - SPIGOT-3729: track area effect clouds
|
||||
+ return this != EntityTypes.PLAYER && this != EntityTypes.EVOKER_FANGS ? (this == EntityTypes.EYE_OF_ENDER ? 4 : (this == EntityTypes.FISHING_BOBBER ? 5 : (this != EntityTypes.SMALL_FIREBALL && this != EntityTypes.DRAGON_FIREBALL && this != EntityTypes.FIREBALL && this != EntityTypes.WITHER_SKULL && this != EntityTypes.SNOWBALL && this != EntityTypes.LLAMA_SPIT && this != EntityTypes.ENDER_PEARL && this != EntityTypes.EGG && this != EntityTypes.POTION && this != EntityTypes.EXPERIENCE_BOTTLE && this != EntityTypes.FIREWORK_ROCKET && this != EntityTypes.TNT ? (this != EntityTypes.ARROW && this != EntityTypes.SPECTRAL_ARROW && this != EntityTypes.TRIDENT && this != EntityTypes.ITEM && this != EntityTypes.FALLING_BLOCK && this != EntityTypes.EXPERIENCE_ORB ? (this != EntityTypes.ITEM_FRAME && this != EntityTypes.LEASH_KNOT && this != EntityTypes.PAINTING && this != EntityTypes.END_CRYSTAL ? 3 : Integer.MAX_VALUE) : 20) : 10))) : 2;
|
||||
}
|
||||
|
||||
public boolean isDeltaTracking() {
|
||||
@@ -372,7 +379,7 @@
|
||||
this.b = enumcreaturetype;
|
||||
}
|
||||
|
||||
- public static <T extends Entity> EntityTypes.a<T> a(EntityTypes.b<T> entitytypes_b, EnumCreatureType enumcreaturetype) {
|
||||
+ public static <T extends Entity> EntityTypes.a<T> a(EntityTypes.b entitytypes_b, EnumCreatureType enumcreaturetype) { // CraftBukkit - decompile error
|
||||
return new EntityTypes.a<>(entitytypes_b, enumcreaturetype);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user