Override initialize in SlotItemHandler, so it uses the itemhandler instead of container (#8679)

This commit is contained in:
ferriarnus authored and GitHub committed 2022-06-09 11:39:04 -07:00
1 parent 3ebd7ba0ef
commit 3beaa817f3
1 file changed
+8
@@ -48,6 +48,14 @@ public class SlotItemHandler extends Slot
this.setChanged();
}
// Override if your IItemHandler does not implement IItemHandlerModifiable
@Override
public void initialize(ItemStack stack)
{
((IItemHandlerModifiable) this.getItemHandler()).setStackInSlot(index, stack);
this.setChanged();
}
@Override
public void onQuickCraft(@NotNull ItemStack oldStackIn, @NotNull ItemStack newStackIn)
{