1
0
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:
SquidDev
2019-02-20 09:48:16 +00:00
parent 70a226207e
commit 46fa798797
7 changed files with 77 additions and 18 deletions

View File

@@ -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 );
}
}