Package codechicken.lib.packet

Examples of codechicken.lib.packet.PacketCustom.writeByte()


        packet.sendToServer();
    }

    public static void sendSetTime(int hour) {
        PacketCustom packet = new PacketCustom(channel, 7);
        packet.writeByte(hour);
        packet.sendToServer();
    }

    public static void sendHeal() {
        PacketCustom packet = new PacketCustom(channel, 8);
View Full Code Here


        packet.sendToServer();
    }

    public static void sendModifyEnchantment(int enchID, int level, boolean add) {
        PacketCustom packet = new PacketCustom(channel, 22);
        packet.writeByte(enchID);
        packet.writeByte(level);
        packet.writeBoolean(add);
        packet.sendToServer();
    }
View Full Code Here

    }

    public static void sendModifyEnchantment(int enchID, int level, boolean add) {
        PacketCustom packet = new PacketCustom(channel, 22);
        packet.writeByte(enchID);
        packet.writeByte(level);
        packet.writeBoolean(add);
        packet.sendToServer();
    }

    public static void sendSetPropertyDisabled(String name, boolean enable) {
View Full Code Here

        {
            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

        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);
    }

    private static void packetType3(int color, int count, int dir, BlockCoord bc, World world)
View Full Code Here

            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);
    }

    private static void packetType3(int color, int count, int dir, BlockCoord bc, World world)
    {
View Full Code Here

        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);
    }

    private static class ParticleLogicPipeRouterFlow extends ParticleLogicApproachPoint
View Full Code Here

            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);
    }

    private static class ParticleLogicPipeRouterFlow extends ParticleLogicApproachPoint
    {
View Full Code Here

        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);
    }

    private static void packetType2(int color, int count, int dir, BlockCoord bc, World world)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.