mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 07:02:18 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
39
nms-patches/EntityTypes.patch
Normal file
39
nms-patches/EntityTypes.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
--- a/net/minecraft/server/EntityTypes.java
|
||||
+++ b/net/minecraft/server/EntityTypes.java
|
||||
@@ -148,10 +148,16 @@
|
||||
|
||||
@Nullable
|
||||
public T a(World world, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, boolean flag, boolean flag1) {
|
||||
+ // CraftBukkit start
|
||||
+ return spawnCreature(world, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, 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) {
|
||||
Entity entity = 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
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -185,7 +191,7 @@
|
||||
}
|
||||
|
||||
a(world, entityhuman, entity, nbttagcompound);
|
||||
- return entity;
|
||||
+ return (T) entity; // CraftBukkit - decompile error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +246,7 @@
|
||||
|
||||
@Nullable
|
||||
public T a(World world) {
|
||||
- return (Entity) this.aU.apply(world);
|
||||
+ return this.aU.apply(world); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
@Nullable
|
Reference in New Issue
Block a user