Package codechicken.lib.packet

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


            {
                @Override
                public void sendPacket(EntityPlayerMP player, int windowId) {
                    PacketCustom packet = new PacketCustom(channel, 23);
                    packet.writeBoolean(true);
                    packet.writeByte(windowId);
                    packet.sendToPlayer(player);
                }
            });
        } else {
            sender.closeContainer();
View Full Code Here


        ServerUtils.openSMPContainer(player, new ContainerEnchantmentModifier(player.inventory, player.worldObj, 0, 0, 0), new IGuiPacketSender()
        {
            @Override
            public void sendPacket(EntityPlayerMP player, int windowId) {
                PacketCustom packet = new PacketCustom(channel, 21);
                packet.writeByte(windowId);
                packet.sendToPlayer(player);
            }
        });
    }
View Full Code Here

        ServerUtils.openSMPContainer(player, new ContainerPotionCreator(player.inventory, b), new IGuiPacketSender()
        {
            @Override
            public void sendPacket(EntityPlayerMP player, int windowId) {
                PacketCustom packet = new PacketCustom(channel, 24);
                packet.writeByte(windowId);
                packet.sendToPlayer(player);
            }
        });
    }
View Full Code Here

            if (!NEIServerConfig.isPlayerInList(player.getCommandSenderName(), entry.value, true))
                bannedItems.add(entry.key);

        PacketCustom packet = new PacketCustom(channel, 10);

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

        packet.writeByte(disabled.size());
        for (String s : disabled)
View Full Code Here

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

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

        packet.writeByte(enabled.size());
        for (String s : enabled)
View Full Code Here

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

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

        packet.writeInt(bannedItems.size());
        for (ItemStack stack : bannedItems)
View Full Code Here

    }

    public static void sendHasServerSideTo(EntityPlayerMP player) {
        NEIServerConfig.logger.debug("Sending serverside check to: " + player.getCommandSenderName());
        PacketCustom packet = new PacketCustom(channel, 1);
        packet.writeByte(NEIActions.protocol);
        packet.writeString(CommonUtils.getWorldName(player.worldObj));

        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();
    }
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) {
        PacketCustom packet = NEICPH.createContainerPacket();
View Full Code Here

    }

    public void removePotionEffect(int effectID) {
        PacketCustom packet = NEICPH.createContainerPacket();
        packet.writeBoolean(false);
        packet.writeByte(effectID);
        packet.sendToServer();
    }
}
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.