use of mcjty.rftools.blocks.endergen.EndergenicTileEntity in project RFTools by McJty.
the class ClientCommandHandler method registerCommands.
public static void registerCommands() {
McJtyLib.registerClientCommand(RFTools.MODID, CMD_RETURN_DESTINATION_INFO, (player, arguments) -> {
MatterTransmitterBlock.setDestinationInfo(arguments.getInt(), arguments.getString());
return true;
});
if (SecurityConfiguration.enabled) {
McJtyLib.registerClientCommand(RFTools.MODID, CMD_RETURN_SECURITY_NAME, (player, arguments) -> {
SecurityCardItem.channelNameFromServer = arguments.getString();
return true;
});
}
McJtyLib.registerClientCommand(RFTools.MODID, CMD_RETURN_SCAN_DIRTY, (player, arguments) -> {
ScanDataManagerClient.getScansClient().getOrCreateScan(arguments.getInt()).setDirtyCounter(arguments.getInt());
return true;
});
McJtyLib.registerClientCommand(RFTools.MODID, CMD_RETURN_ENERGY_CONSUMPTION, (player, arguments) -> {
GuiLocator.energyConsumption = arguments.getInt();
return true;
});
McJtyLib.registerClientCommand(RFTools.MODID, CMD_RETURN_STORAGE_INFO, (player, arguments) -> {
ModularStorageBlock.cntReceived = arguments.getInt();
ModularStorageBlock.nameModuleReceived = arguments.getString();
return true;
});
McJtyLib.registerClientCommand(RFTools.MODID, CMD_FLASH_ENDERGENIC, (player, arguments) -> {
BlockPos pos = arguments.getBlockPos();
TileEntity te = RFTools.proxy.getClientWorld().getTileEntity(pos);
if (te instanceof EndergenicTileEntity) {
EndergenicTileEntity tileEntity = (EndergenicTileEntity) te;
tileEntity.syncCountersFromServer(arguments.getInt(), arguments.getInt());
}
return true;
});
McJtyLib.registerClientCommand(RFTools.MODID, CMD_POSITION_TO_CLIENT, (player, arguments) -> {
BlockPos tePos = arguments.getBlockPos();
BlockPos scanPos = arguments.getBlockPos();
TileEntity te = RFTools.proxy.getClientWorld().getTileEntity(tePos);
if (te instanceof BuilderTileEntity) {
BuilderTileEntity.setScanLocationClient(tePos, scanPos);
}
return true;
});
McJtyLib.registerClientCommand(RFTools.MODID, CMD_RETURN_COUNTER_INFO, (player, arguments) -> {
CounterBlock.cntReceived = arguments.getInt();
return true;
});
}
use of mcjty.rftools.blocks.endergen.EndergenicTileEntity in project RFTools by McJty.
the class ForgeEventHandlers method onPostWorldTick.
@SubscribeEvent
public void onPostWorldTick(TickEvent.WorldTickEvent event) {
if (!event.world.isRemote) {
for (EndergenicTileEntity endergenic : EndergenicTileEntity.todoEndergenics) {
endergenic.checkStateServer();
}
EndergenicTileEntity.todoEndergenics.clear();
EndergenicTileEntity.endergenicsAdded.clear();
}
}
Aggregations