Optional Slots...
This commit is contained in:
parent
26724d5ab8
commit
bc335ac5d6
8
container/slot/IOptionalSlotHost.java
Normal file
8
container/slot/IOptionalSlotHost.java
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
package appeng.container.slot;
|
||||||
|
|
||||||
|
public interface IOptionalSlotHost
|
||||||
|
{
|
||||||
|
|
||||||
|
boolean isSlotEnabled(int idx, OptionalSlotFake osf);
|
||||||
|
|
||||||
|
}
|
29
container/slot/OptionalSlotFake.java
Normal file
29
container/slot/OptionalSlotFake.java
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
package appeng.container.slot;
|
||||||
|
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
|
||||||
|
public class OptionalSlotFake extends SlotFake
|
||||||
|
{
|
||||||
|
|
||||||
|
int invSlot;
|
||||||
|
final int groupNum;
|
||||||
|
IOptionalSlotHost host;
|
||||||
|
|
||||||
|
int srcX;
|
||||||
|
int srcY;
|
||||||
|
|
||||||
|
public OptionalSlotFake(IInventory inv, IOptionalSlotHost containerBus, int idx, int x, int y, int offX, int offY, int groupNum) {
|
||||||
|
super( inv, idx, x + offX * 18, y + offY * 18 );
|
||||||
|
srcX = x;
|
||||||
|
srcY = y;
|
||||||
|
invSlot = idx;
|
||||||
|
this.groupNum = groupNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled()
|
||||||
|
{
|
||||||
|
return host.isSlotEnabled( groupNum, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue