use of uk.co.wehavecookies56.kk.common.network.packet.client.SyncRecipeData in project Kingdom-Keys-Re-Coded by Wehavecookies56.
the class OpenSynthesis method process.
@Override
public void process(EntityPlayer player, Side side) {
PacketDispatcher.sendTo(new SyncMunnyData(player.getCapability(ModCapabilities.MUNNY, null)), (EntityPlayerMP) player);
PacketDispatcher.sendTo(new SyncRecipeData(player.getCapability(ModCapabilities.SYNTHESIS_RECIPES, null)), (EntityPlayerMP) player);
PacketDispatcher.sendTo(new SyncFreeDevRecipeData(player.getCapability(ModCapabilities.SYNTHESIS_RECIPES, null)), (EntityPlayerMP) player);
PacketDispatcher.sendTo(new SyncMaterialData(player.getCapability(ModCapabilities.SYNTHESIS_MATERIALS, null)), (EntityPlayerMP) player);
}
use of uk.co.wehavecookies56.kk.common.network.packet.client.SyncRecipeData in project Kingdom-Keys-Re-Coded by Wehavecookies56.
the class BlockSynthesisTable method onBlockActivated.
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
world.playSound((EntityPlayer) null, player.posX, player.posY, player.posZ, ModSounds.kupo, SoundCategory.BLOCKS, 0.5F, 1.0F);
if (world.isRemote)
PacketDispatcher.sendToServer(new OpenSynthesis());
player.openGui(KingdomKeys.instance, GuiIDs.GUI_SYNTHESISTABLE, world, pos.getX(), pos.getY(), pos.getZ());
if (!world.isRemote) {
PacketDispatcher.sendTo(new SyncRecipeData(player.getCapability(ModCapabilities.SYNTHESIS_RECIPES, null)), (EntityPlayerMP) player);
PacketDispatcher.sendTo(new SyncFreeDevRecipeData(player.getCapability(ModCapabilities.SYNTHESIS_RECIPES, null)), (EntityPlayerMP) player);
PacketDispatcher.sendTo(new SyncMaterialData(player.getCapability(ModCapabilities.SYNTHESIS_MATERIALS, null)), (EntityPlayerMP) player);
}
return true;
}
Aggregations