13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/net/minecraft/world/item/ItemMonsterEgg.patch
CraftBukkit/Spigot 9da047989c Repackage NMS
By: md_5 <git@md-5.net>
2021-03-16 09:00:00 +11:00

21 Zeilen
981 B
Diff

--- a/net/minecraft/world/item/ItemMonsterEgg.java
+++ b/net/minecraft/world/item/ItemMonsterEgg.java
@@ -167,7 +167,7 @@
return Optional.empty();
} else {
((EntityInsentient) object).setPositionRotation(vec3d.getX(), vec3d.getY(), vec3d.getZ(), 0.0F, 0.0F);
- worldserver.addAllEntities((Entity) object);
+ worldserver.addAllEntities((Entity) object, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
if (itemstack.hasName()) {
((EntityInsentient) object).setCustomName(itemstack.getName());
}
@@ -176,7 +176,7 @@
itemstack.subtract(1);
}
- return Optional.of(object);
+ return Optional.of((EntityInsentient) object); // CraftBukkit - decompile error
}
}
}