Search in sources :

Example 1 with SyncFreeDevRecipeData

use of uk.co.wehavecookies56.kk.common.network.packet.client.SyncFreeDevRecipeData 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);
}
Also used : SyncRecipeData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncRecipeData) SyncFreeDevRecipeData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncFreeDevRecipeData) SyncMunnyData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncMunnyData) SyncMaterialData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncMaterialData)

Example 2 with SyncFreeDevRecipeData

use of uk.co.wehavecookies56.kk.common.network.packet.client.SyncFreeDevRecipeData 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;
}
Also used : SyncRecipeData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncRecipeData) SyncFreeDevRecipeData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncFreeDevRecipeData) OpenSynthesis(uk.co.wehavecookies56.kk.common.network.packet.server.OpenSynthesis) SyncMaterialData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncMaterialData)

Aggregations

SyncFreeDevRecipeData (uk.co.wehavecookies56.kk.common.network.packet.client.SyncFreeDevRecipeData)2 SyncMaterialData (uk.co.wehavecookies56.kk.common.network.packet.client.SyncMaterialData)2 SyncRecipeData (uk.co.wehavecookies56.kk.common.network.packet.client.SyncRecipeData)2 SyncMunnyData (uk.co.wehavecookies56.kk.common.network.packet.client.SyncMunnyData)1 OpenSynthesis (uk.co.wehavecookies56.kk.common.network.packet.server.OpenSynthesis)1