mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-26 23:03:18 +00:00
Fix #1714 Wax cast negative durability
This commit is contained in:
1 parent
d148279224
commit
149b35224a
1 file changed
+7
-2
@@ -10,10 +10,11 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.items;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.core.items.ICraftingPlan;
|
||||
import forestry.core.items.ItemForestry;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemWaxCast extends ItemForestry implements ICraftingPlan {
|
||||
|
||||
@@ -27,7 +28,11 @@ public class ItemWaxCast extends ItemForestry implements ICraftingPlan {
|
||||
@Override
|
||||
public ItemStack planUsed(ItemStack plan, ItemStack result) {
|
||||
plan.setItemDamage(plan.getItemDamage() + result.getCount());
|
||||
return plan;
|
||||
if (plan.getItemDamage() >= plan.getMaxDamage()) {
|
||||
return ItemStack.EMPTY;
|
||||
} else {
|
||||
return plan;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user