Applied-Energistics-2-tiler.../container/slot/OptionalSlotNormal.java

27 lines
516 B
Java
Raw Normal View History

2014-01-20 17:41:37 +01:00
package appeng.container.slot;
import net.minecraft.inventory.IInventory;
public class OptionalSlotNormal extends AppEngSlot
{
final int groupNum;
IOptionalSlotHost host;
public OptionalSlotNormal(IInventory inv, IOptionalSlotHost containerBus, int slot, int xPos, int yPos, int groupNum) {
super( inv, slot, xPos, yPos );
this.groupNum = groupNum;
host = containerBus;
}
@Override
public boolean isEnabled()
{
if ( host == null )
return false;
return host.isSlotEnabled( groupNum );
}
}