Package codechicken.lib.packet

Examples of codechicken.lib.packet.PacketCustom


            packet.writeItemStack(stack);
        packet.sendToServer();
    }

    public static void sendDummySlotSet(int slotNumber, ItemStack stack) {
        PacketCustom packet = new PacketCustom(channel, 25);
        packet.writeShort(slotNumber);
        packet.writeItemStack(stack, true);
        packet.sendToServer();
    }
View Full Code Here


        packet.sendToPlayer(player);
    }

    public static void sendAddMagneticItemTo(EntityPlayerMP player, EntityItem item) {
        PacketCustom packet = new PacketCustom(channel, 13);
        packet.writeInt(item.getEntityId());

        packet.sendToPlayer(player);
    }
View Full Code Here

        for(int i = 0; i < syncVars.size(); i++)
        {
            IContainerSyncVar var = syncVars.get(i);
            if(var.changed())
            {
                PacketCustom packet = createSyncPacket();
                packet.writeByte(i);
                var.writeChange(packet);
                sendContainerPacket(packet);
                var.reset();
            }
        }
View Full Code Here

    {
        super.sendContainerAndContentsToPlayer(container, list, playerCrafters);
        for(int i = 0; i < syncVars.size(); i++)
        {
            IContainerSyncVar var = syncVars.get(i);
            PacketCustom packet = createSyncPacket();
            packet.writeByte(i);
            var.writeChange(packet);
            var.reset();
            for(EntityPlayerMP player : playerCrafters)
                packet.sendToPlayer(player);
        }
    }
View Full Code Here

    private static void packetType2(int color, int count, int dir, BlockCoord bc, World world)
    {
        if (world.isRemote)
            return;

        PacketCustom packet = new PacketCustom(TransportationSPH.channel(), TransportationSPH.particle_Spawn());

        packet.writeByte(2);
        packet.writeByte(color).writeByte(count).writeCoord(bc).writeByte(dir);
        packet.sendPacketToAllAround(bc.x, bc.y, bc.z, 64.0D, world.provider.dimensionId);
    }
View Full Code Here

    private static void packetType3(int color, int count, int dir, BlockCoord bc, World world)
    {
        if (world.isRemote)
            return;

        PacketCustom packet = new PacketCustom(TransportationSPH.channel(), TransportationSPH.particle_Spawn());

        packet.writeByte(3);
        packet.writeByte(color).writeByte(count).writeCoord(bc).writeByte(dir);
        packet.sendPacketToAllAround(bc.x, bc.y, bc.z, 64.0D, world.provider.dimensionId);
    }
View Full Code Here

    private static void packetType1(int color, int count, BlockCoord bc, World world)
    {
        if (world.isRemote)
            return;

        PacketCustom packet = new PacketCustom(TransportationSPH.channel(), TransportationSPH.particle_Spawn());

        packet.writeByte(1);
        packet.writeByte(color).writeByte(count).writeCoord(bc);
        packet.sendPacketToAllAround(bc.x, bc.y, bc.z, 64.0D, world.provider.dimensionId);
    }
View Full Code Here

TOP

Related Classes of codechicken.lib.packet.PacketCustom

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.