diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch index 7b620d678..a64c4c520 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch @@ -66,7 +66,7 @@ + if (facing != null && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { + if (facing == EnumFacing.UP) + return handlers[0].cast(); -+ else if (facing == EnumFacing.UP) ++ else if (facing == EnumFacing.DOWN) + return handlers[1].cast(); + else + return handlers[2].cast(); diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch index 2fb92d6f3..a18b1f4c1 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch @@ -88,7 +88,7 @@ + if (facing != null && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { + if (facing == EnumFacing.UP) + return handlers[0].cast(); -+ else if (facing == EnumFacing.UP) ++ else if (facing == EnumFacing.DOWN) + return handlers[1].cast(); + else + return handlers[2].cast(); diff --git a/src/main/java/net/minecraftforge/items/wrapper/SidedInvWrapper.java b/src/main/java/net/minecraftforge/items/wrapper/SidedInvWrapper.java index 4208b6286..8cf581247 100644 --- a/src/main/java/net/minecraftforge/items/wrapper/SidedInvWrapper.java +++ b/src/main/java/net/minecraftforge/items/wrapper/SidedInvWrapper.java @@ -34,11 +34,11 @@ public class SidedInvWrapper implements IItemHandlerModifiable protected final EnumFacing side; @SuppressWarnings("unchecked") - public static > T[] create(ISidedInventory inv, EnumFacing... sides) { - T[] ret = (T[])new Object[sides.length]; + public static OptionalCapabilityInstance[] create(ISidedInventory inv, EnumFacing... sides) { + OptionalCapabilityInstance[] ret = new OptionalCapabilityInstance[sides.length]; for (int x = 0; x < sides.length; x++) { final EnumFacing side = sides[x]; - ret[x] = (T)OptionalCapabilityInstance.of(() -> (IItemHandlerModifiable)new SidedInvWrapper(inv, side)); + ret[x] = OptionalCapabilityInstance.of(() -> new SidedInvWrapper(inv, side)); } return ret; }