From b20e1ac4d777231a0fbcaf561184c0421805d04a Mon Sep 17 00:00:00 2001 From: WayofTime Date: Sun, 29 Apr 2018 08:40:42 -0400 Subject: [PATCH] Fixed Cutting Fluids so they now work properly. --- changelog.txt | 2 +- .../WayofTime/bloodmagic/tile/TileAlchemyTable.java | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 46e87f91..94038314 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,7 +2,7 @@ Version 2.2.12 ------------------------------------------------------ - Fixed Hellfire Forge and Alchemy Table's shape-crafted-ness. - +- Fixed Cutting Fluids so they now work properly. ------------------------------------------------------ Version 2.2.11 diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyTable.java b/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyTable.java index 11b9e8eb..4871b0b5 100644 --- a/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyTable.java +++ b/src/main/java/WayofTime/bloodmagic/tile/TileAlchemyTable.java @@ -3,13 +3,11 @@ package WayofTime.bloodmagic.tile; import java.util.ArrayList; import java.util.List; -import WayofTime.bloodmagic.api.event.BloodMagicCraftedEvent; import net.minecraft.block.state.IBlockState; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityHopper; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; import net.minecraft.util.math.BlockPos; @@ -17,18 +15,22 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.ItemHandlerHelper; + +import org.apache.commons.lang3.ArrayUtils; + +import WayofTime.bloodmagic.api.event.BloodMagicCraftedEvent; import WayofTime.bloodmagic.api.impl.BloodMagicAPI; import WayofTime.bloodmagic.api.impl.recipe.RecipeAlchemyTable; import WayofTime.bloodmagic.core.data.Binding; import WayofTime.bloodmagic.core.data.SoulNetwork; import WayofTime.bloodmagic.core.registry.AlchemyTableRecipeRegistry; import WayofTime.bloodmagic.iface.IBindable; +import WayofTime.bloodmagic.iface.ICustomAlchemyConsumable; import WayofTime.bloodmagic.orb.BloodOrb; import WayofTime.bloodmagic.orb.IBloodOrb; import WayofTime.bloodmagic.recipe.alchemyTable.AlchemyTableRecipe; import WayofTime.bloodmagic.util.Constants; import WayofTime.bloodmagic.util.helper.NetworkHelper; -import org.apache.commons.lang3.ArrayUtils; public class TileAlchemyTable extends TileInventory implements ISidedInventory, ITickable { @@ -336,6 +338,8 @@ public class TileAlchemyTable extends TileInventory implements ISidedInventory, ItemStack currentStack = getStackInSlot(i); if (currentStack.getItem().hasContainerItem(currentStack)) setInventorySlotContents(i, currentStack.getItem().getContainerItem(currentStack)); + else if (currentStack.getItem() instanceof ICustomAlchemyConsumable) + setInventorySlotContents(i, ((ICustomAlchemyConsumable) currentStack.getItem()).drainUseOnAlchemyCraft(currentStack)); else currentStack.shrink(1); }