use of mcjty.rftoolscontrol.network.PacketGraphicsReady in project RFToolsControl by McJty.
the class CommandHandler method registerCommands.
public static void registerCommands() {
McJtyLib.registerCommand(RFToolsControl.MODID, CMD_TESTRECIPE, (player, arguments) -> {
ItemStack heldItem = player.getHeldItem(EnumHand.MAIN_HAND);
if (heldItem.isEmpty()) {
return false;
}
if (heldItem.getItem() instanceof CraftingCardItem) {
CraftingCardItem.testRecipe(player.getEntityWorld(), heldItem);
}
return true;
});
McJtyLib.registerCommand(RFToolsControl.MODID, CMD_GETGRAPHICS, (player, arguments) -> {
TileEntity te = player.getEntityWorld().getTileEntity(arguments.getBlockPos());
if (te instanceof ProcessorTileEntity) {
ProcessorTileEntity processor = (ProcessorTileEntity) te;
RFToolsCtrlMessages.INSTANCE.sendTo(new PacketGraphicsReady(processor), (EntityPlayerMP) player);
}
return true;
});
}
Aggregations