diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs index 6a0307ebb..b6aa43c6f 100644 --- a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs +++ b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.codeComplete.visibilityCheck=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore diff --git a/patches/common/net/minecraft/src/SlotCrafting.java.patch b/patches/common/net/minecraft/src/SlotCrafting.java.patch index bd45536ed..2f1c40db4 100644 --- a/patches/common/net/minecraft/src/SlotCrafting.java.patch +++ b/patches/common/net/minecraft/src/SlotCrafting.java.patch @@ -1,18 +1,29 @@ --- ../src_base/common/net/minecraft/src/SlotCrafting.java +++ ../src_work/common/net/minecraft/src/SlotCrafting.java -@@ -1,4 +1,6 @@ +@@ -1,4 +1,8 @@ package net.minecraft.src; + +import net.minecraftforge.common.ForgeHooks; ++import net.minecraftforge.common.MinecraftForge; ++import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; import cpw.mods.fml.common.registry.GameRegistry; -@@ -122,7 +124,7 @@ +@@ -122,9 +126,15 @@ if (var3.getItem().hasContainerItem()) { - ItemStack var4 = new ItemStack(var3.getItem().getContainerItem()); + ItemStack var4 = var3.getItem().getContainerItemStack(var3); ++ ++ if (var4.isItemStackDamageable() && var4.getItemDamage() > var4.getMaxDamage()) ++ { ++ MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(thePlayer, var4)); ++ var4 = null; ++ } - if (!var3.getItem().doesContainerItemLeaveCraftingGrid(var3) || !this.thePlayer.inventory.addItemStackToInventory(var4)) +- if (!var3.getItem().doesContainerItemLeaveCraftingGrid(var3) || !this.thePlayer.inventory.addItemStackToInventory(var4)) ++ if (var4 != null && (!var3.getItem().doesContainerItemLeaveCraftingGrid(var3) || !this.thePlayer.inventory.addItemStackToInventory(var4))) { + if (this.craftMatrix.getStackInSlot(var2) == null) + {