summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemMonsterEgg.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-26 08:32:16 +1100
committermd_5 <git@md-5.net>2014-11-28 17:16:30 +1100
commit24557bc2b37deb6a0edf497d547471832457b1dd (patch)
treec560572889a3b0b34964a0cddb35dc87fda3c914 /nms-patches/ItemMonsterEgg.patch
parenta4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff)
downloadcraftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'nms-patches/ItemMonsterEgg.patch')
-rw-r--r--nms-patches/ItemMonsterEgg.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/nms-patches/ItemMonsterEgg.patch b/nms-patches/ItemMonsterEgg.patch
new file mode 100644
index 00000000..3a5fbee6
--- /dev/null
+++ b/nms-patches/ItemMonsterEgg.patch
@@ -0,0 +1,25 @@
+--- ../work/decompile-bb26c12b/net/minecraft/server/ItemMonsterEgg.java 2014-11-27 08:59:46.789421459 +1100
++++ src/main/java/net/minecraft/server/ItemMonsterEgg.java 2014-11-27 08:42:10.172850872 +1100
+@@ -19,7 +19,8 @@
+ }
+
+ public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2) {
+- if (world.isStatic) {
++ // CraftBukkit - check ItemStack data
++ if (world.isStatic || itemstack.getData() == 48 || itemstack.getData() == 49 || itemstack.getData() == 63 || itemstack.getData() == 64) {
+ return true;
+ } else if (!entityhuman.a(blockposition.shift(enumdirection), enumdirection, itemstack)) {
+ return false;
+@@ -109,6 +110,12 @@
+ }
+
+ public static Entity a(World world, int i, double d0, double d1, double d2) {
++ // CraftBukkit start - delegate to spawnCreature
++ return spawnCreature(world, i, d0, d1, d2, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
++ }
++
++ public static Entity spawnCreature(World world, int i, double d0, double d1, double d2, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
++ // CraftBukkit end
+ if (!EntityTypes.eggInfo.containsKey(Integer.valueOf(i))) {
+ return null;
+ } else {