CraftingStation side chest now work with any IInventory with a configurable blacklist. (#35)

* CraftingStation side chest now work with any IInventory with a configurable blacklist.

* Check ISidedInventory and accessible slots.  Still needs some work for shift clicking.

* Backport shift click behavior and some helper functions

* Fix NEI overlap, and tinker's tool station integration

* Fix NEI shift clicking by redoing math
This commit is contained in:
Jason Mitchell authored and GitHub committed 2022-01-06 10:24:28 +01:00
1 parent 1c305ff293
commit 1c46541223
14 files changed
+1455 -499

No files matched your search

@@ -0,0 +1,32 @@
package tconstruct.tools.gui;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
public class ChestSlot extends Slot {
/*
* A Slot, used for adjacent Chest Inventories, that can be disabled.
*/
public boolean enabled = true;
public ChestSlot(IInventory inventory, int index, int xPosition, int yPosition) {
super(inventory, index, xPosition, yPosition);
}
@SideOnly(Side.CLIENT)
@Override
public boolean func_111238_b/*isEnabled*/() {
return enabled;
}
public void disable() {
enabled = false;
}
public void enable() {
enabled = true;
}
}