mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-11 19:03:03 +00:00
Started work on upgrading to 1.16.1. Not in a compilable state yet
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2019. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
|
||||
package dan200.computercraft.shared.util;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
|
||||
public class ValidatingSlot extends Slot
|
||||
{
|
||||
private final int invSlot;
|
||||
|
||||
public ValidatingSlot( Inventory inventoryIn, int index, int xPosition, int yPosition )
|
||||
{
|
||||
super( inventoryIn, index, xPosition, yPosition );
|
||||
this.invSlot = index;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsert( ItemStack stack )
|
||||
{
|
||||
return inventory.isValid( invSlot, stack );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user