use of logisticspipes.modules.ModuleProvider in project LogisticsPipes by RS485.
the class ProviderModuleGuiProvider method getContainer.
@Override
public DummyContainer getContainer(EntityPlayer player) {
ModuleProvider module = this.getLogisticsModule(player.getEntityWorld(), ModuleProvider.class);
if (module == null) {
return null;
}
DummyContainer dummy = new DummyContainer(player.inventory, module.getFilterInventory());
dummy.addNormalSlotsForPlayerInventory(18, 97);
int xOffset = 72;
int yOffset = 18;
for (int row = 0; row < 3; row++) {
for (int column = 0; column < 3; column++) {
dummy.addDummySlot(column + row * 3, xOffset + column * 18, yOffset + row * 18);
}
}
return dummy;
}
use of logisticspipes.modules.ModuleProvider in project LogisticsPipes by RS485.
the class ProviderModuleIncludePacket method processPacket.
@Override
public void processPacket(EntityPlayer player) {
final ModuleProvider module = this.getLogisticsModule(player, ModuleProvider.class);
if (module == null) {
return;
}
module.setFilterExcluded(!module.isExcludeFilter());
MainProxy.sendPacketToPlayer(PacketHandler.getPacket(ProviderModuleInclude.class).setFlag(module.isExcludeFilter()).setModulePos(module), player);
}
use of logisticspipes.modules.ModuleProvider in project LogisticsPipes by RS485.
the class ProviderModuleInclude method processPacket.
@Override
public void processPacket(EntityPlayer player) {
final ModuleProvider module = this.getLogisticsModule(player, ModuleProvider.class);
if (module == null) {
return;
}
module.setFilterExcluded(isFlag());
}
use of logisticspipes.modules.ModuleProvider in project LogisticsPipes by RS485.
the class ProviderModuleInHand method getContainer.
@Override
public DummyContainer getContainer(EntityPlayer player) {
DummyModuleContainer dummy = new DummyModuleContainer(player, getInvSlot());
if (!(dummy.getModule() instanceof ModuleProvider)) {
return null;
}
dummy.setInventory(((ModuleProvider) dummy.getModule()).getFilterInventory());
dummy.addNormalSlotsForPlayerInventory(18, 97);
int xOffset = 72;
int yOffset = 18;
for (int row = 0; row < 3; row++) {
for (int column = 0; column < 3; column++) {
dummy.addDummySlot(column + row * 3, xOffset + column * 18, yOffset + row * 18);
}
}
return dummy;
}
use of logisticspipes.modules.ModuleProvider in project LogisticsPipes by RS485.
the class ProviderModuleGuiProvider method getClientGui.
@Override
public Object getClientGui(EntityPlayer player) {
ModuleProvider module = this.getLogisticsModule(player.getEntityWorld(), ModuleProvider.class);
if (module == null) {
return null;
}
module.setFilterExcluded(exclude);
module.setExtractionMode(extractorMode);
module.setSneakyDirection(sneakyOrientation);
module.setIsActive(isActive);
return new logisticspipes.gui.modules.GuiProvider(player.inventory, module);
}
Aggregations