Fix max entity radius not being settable by making it a instance method on world. Closes #5601

Fix VoidFluidHandler.INSTANCE not being a instance of VoidFluidHandler. Closes #5602
Remove backwards compat code and make IItemHandler.isItemValid non-default. Closes #5598
This commit is contained in:
LexManos committed 2019-03-11 15:04:04 -07:00
1 parent 7292b63052
commit 7113f4400c
7 files changed
+41 -41

No files matched your search

@@ -44,27 +44,9 @@ public class SlotItemHandler extends Slot
@Override
public boolean isItemValid(@Nonnull ItemStack stack)
{
if (stack.isEmpty() || !itemHandler.isItemValid(index, stack))
if (stack.isEmpty())
return false;
IItemHandler handler = this.getItemHandler();
ItemStack remainder;
if (handler instanceof IItemHandlerModifiable)
{
IItemHandlerModifiable handlerModifiable = (IItemHandlerModifiable) handler;
ItemStack currentStack = handlerModifiable.getStackInSlot(index);
handlerModifiable.setStackInSlot(index, ItemStack.EMPTY);
remainder = handlerModifiable.insertItem(index, stack, true);
handlerModifiable.setStackInSlot(index, currentStack);
}
else
{
remainder = handler.insertItem(index, stack, true);
}
return remainder.getCount() < stack.getCount();
return itemHandler.isItemValid(index, stack);
}
@Override