From 9f571ff15da265cda364bc889d692bbda44dad13 Mon Sep 17 00:00:00 2001 From: diesieben07 Date: Thu, 16 Jul 2015 14:13:48 +0200 Subject: [PATCH] Allow the new entity eggs to be created via middle-click --- patches/minecraft/net/minecraft/entity/Entity.java.patch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/entity/Entity.java.patch b/patches/minecraft/net/minecraft/entity/Entity.java.patch index 027b084ae..40a8bc282 100644 --- a/patches/minecraft/net/minecraft/entity/Entity.java.patch +++ b/patches/minecraft/net/minecraft/entity/Entity.java.patch @@ -125,7 +125,7 @@ } public boolean func_174816_a(Explosion p_174816_1_, World p_174816_2_, BlockPos p_174816_3_, IBlockState p_174816_4_, float p_174816_5_) -@@ -2357,4 +2405,176 @@ +@@ -2357,4 +2405,183 @@ EnchantmentHelper.func_151385_b(p_174815_1_, p_174815_2_); } @@ -201,6 +201,13 @@ + { + return new ItemStack(net.minecraft.init.Items.field_151063_bx, 1, id); + } ++ String name = EntityList.func_75621_b(this); ++ if (name != null && net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().containsKey(name)) ++ { ++ ItemStack stack = new ItemStack(net.minecraft.init.Items.field_151063_bx); ++ stack.func_77983_a("entity_name", new net.minecraft.nbt.NBTTagString(name)); ++ return stack; ++ } + } + return null; + }