mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-28 20:37:38 +00:00
Several minor improvements
- Restrict what items can be inserted into printers. They're now closer to brewing stands or furnaces: nothing can go in the output slot, only ink in the ink slot, and only paper in the paper slot. - Fix build.gradle using the wrong version - Trim the width of tables to fit when displaying on the client. Closes #45. Note, our solution isn't perfect, as it will wordwrap too, but it's adaquate for now.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ValidatingSlot extends Slot
|
||||
{
|
||||
public ValidatingSlot( IInventory inventoryIn, int index, int xPosition, int yPosition )
|
||||
{
|
||||
super( inventoryIn, index, xPosition, yPosition );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid( ItemStack stack )
|
||||
{
|
||||
return true; // inventory.isItemValidForSlot( slotNumber, stack );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user