mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 82792f883 [Auto] Updated Upstream (CraftBukkit) 899bc53b7 Updated Upstream (Bukkit/CraftBukkit) (#4779)
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] EMC - MonsterEggSpawnEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index bf5436510..b089c8a3f 100644
|
||||
index 1138981ae..37b984a5b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -187,19 +187,45 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -187,19 +187,46 @@ public class EntityTypes<T extends Entity> {
|
||||
|
||||
@Nullable
|
||||
public Entity spawnCreature(WorldServer worldserver, @Nullable ItemStack itemstack, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1) {
|
||||
@@ -26,7 +26,8 @@ index bf5436510..b089c8a3f 100644
|
||||
+ public T spawnCreature(WorldServer worldserver, @Nullable ItemStack itemstack, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1) {
|
||||
+ // Purpur end
|
||||
// CraftBukkit start
|
||||
return this.spawnCreature(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
|
||||
- return this.spawnCreature(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
|
||||
+ return this.spawnCreature(worldserver, itemstack, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // Purpur
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -34,6 +35,7 @@ index bf5436510..b089c8a3f 100644
|
||||
+ // Purpur start
|
||||
+ return spawnCreature(worldserver, null, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, spawnReason);
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ public T spawnCreature(WorldServer worldserver, @Nullable ItemStack itemstack, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
+ // Purpur end
|
||||
@@ -53,5 +55,5 @@ index bf5436510..b089c8a3f 100644
|
||||
+ // Purpur end
|
||||
+
|
||||
if (t0 != null) {
|
||||
return worldserver.addAllEntities(t0, spawnReason) ? t0 : null; // Don't return an entity when CreatureSpawnEvent is canceled
|
||||
// CraftBukkit end
|
||||
worldserver.addAllEntities(t0, spawnReason);
|
||||
return !t0.dead ? t0 : null; // Don't return an entity when CreatureSpawnEvent is canceled
|
||||
|
||||
Reference in New Issue
Block a user