Package codechicken.lib.packet

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


        packet.writeByte(enabled.size());
        for (String s : enabled)
            packet.writeString(s);

        packet.writeInt(bannedItems.size());
        for (ItemStack stack : bannedItems)
            packet.writeItemStack(stack);

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


    public void setPotionEffect(int effectID, int duration, int amplifier) {
        PacketCustom packet = NEICPH.createContainerPacket();
        packet.writeBoolean(true);
        packet.writeByte(effectID);
        packet.writeInt(duration);
        packet.writeByte(amplifier);
        packet.sendToServer();
    }

    public void removePotionEffect(int effectID) {
View Full Code Here

        packet.sendToServer();
    }

    public static void sendCreativeScroll(int steps) {
        PacketCustom packet = new PacketCustom(channel, 14);
        packet.writeInt(steps);
        packet.sendToServer();
    }

    public static void sendMobSpawnerID(int x, int y, int z, String mobtype) {
        PacketCustom packet = new PacketCustom(channel, 15);
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);
    }

    public static final String channel = "NEI";
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.