2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/item/ItemMonsterEgg.java
|
|
|
|
+++ b/net/minecraft/world/item/ItemMonsterEgg.java
|
2022-12-07 17:00:00 +01:00
|
|
|
@@ -186,7 +186,7 @@
|
2020-06-25 02:00:00 +02:00
|
|
|
return Optional.empty();
|
|
|
|
} else {
|
2021-11-21 23:00:00 +01:00
|
|
|
((EntityInsentient) object).moveTo(vec3d.x(), vec3d.y(), vec3d.z(), 0.0F, 0.0F);
|
|
|
|
- worldserver.addFreshEntityWithPassengers((Entity) object);
|
|
|
|
+ worldserver.addFreshEntityWithPassengers((Entity) object, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
|
|
|
|
if (itemstack.hasCustomHoverName()) {
|
|
|
|
((EntityInsentient) object).setCustomName(itemstack.getHoverName());
|
2020-06-25 02:00:00 +02:00
|
|
|
}
|
2022-12-07 17:00:00 +01:00
|
|
|
@@ -195,7 +195,7 @@
|
2021-11-21 23:00:00 +01:00
|
|
|
itemstack.shrink(1);
|
2020-06-25 02:00:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
- return Optional.of(object);
|
|
|
|
+ return Optional.of((EntityInsentient) object); // CraftBukkit - decompile error
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|