mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
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:
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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user