use of logisticspipes.modules.ModuleElectricManager in project LogisticsPipes by RS485.
the class ElectricModuleSlot method getClientGui.
@Override
public Object getClientGui(EntityPlayer player) {
ModuleElectricManager module = this.getLogisticsModule(player.getEntityWorld(), ModuleElectricManager.class);
if (module == null) {
return null;
}
module.setDischargeMode(isFlag());
return new GuiElectricManager(player.inventory, module);
}
use of logisticspipes.modules.ModuleElectricManager in project LogisticsPipes by RS485.
the class ElectricModuleInHand method getContainer.
@Override
public DummyContainer getContainer(EntityPlayer player) {
DummyModuleContainer dummy = new DummyModuleContainer(player, getInvSlot());
if (!(dummy.getModule() instanceof ModuleElectricManager)) {
return null;
}
dummy.setInventory(((ModuleElectricManager) dummy.getModule()).getFilterInventory());
dummy.addNormalSlotsForPlayerInventory(8, 60);
//Pipe slots
for (int pipeSlot = 0; pipeSlot < 9; pipeSlot++) {
dummy.addDummySlot(pipeSlot, 8 + pipeSlot * 18, 18);
}
return dummy;
}
use of logisticspipes.modules.ModuleElectricManager in project LogisticsPipes by RS485.
the class ElectricManagerPacket method processPacket.
@Override
public void processPacket(EntityPlayer player) {
ModuleElectricManager module = this.getLogisticsModule(player, ModuleElectricManager.class);
if (module == null) {
return;
}
module.setDischargeMode(isFlag());
}
use of logisticspipes.modules.ModuleElectricManager in project LogisticsPipes by RS485.
the class ElectricManagetMode method processPacket.
@Override
public void processPacket(EntityPlayer player) {
ModuleElectricManager module = this.getLogisticsModule(player, ModuleElectricManager.class);
if (module == null) {
return;
}
module.setDischargeMode(isFlag());
}
use of logisticspipes.modules.ModuleElectricManager in project LogisticsPipes by RS485.
the class ElectricModuleSlot method getContainer.
@Override
public DummyContainer getContainer(EntityPlayer player) {
ModuleElectricManager module = this.getLogisticsModule(player.getEntityWorld(), ModuleElectricManager.class);
if (module == null) {
return null;
}
DummyContainer dummy = new DummyContainer(player.inventory, module.getFilterInventory());
dummy.addNormalSlotsForPlayerInventory(8, 60);
//Pipe slots
for (int pipeSlot = 0; pipeSlot < 9; pipeSlot++) {
dummy.addDummySlot(pipeSlot, 8 + pipeSlot * 18, 18);
}
return dummy;
}
Aggregations