Search in sources :

Example 1 with POBoxInfo

use of forestry.mail.POBoxInfo in project ForestryMC by ForestryMC.

the class ContainerMailbox method slotClick.

@Override
public ItemStack slotClick(int slotId, int dragType_or_button, ClickType clickTypeIn, EntityPlayer player) {
    ItemStack stack = super.slotClick(slotId, dragType_or_button, clickTypeIn, player);
    if (SlotUtil.isSlotInRange(slotId, SLOT_LETTERS, SLOT_LETTERS_COUNT)) {
        if (!player.world.isRemote && mailInventory != null) {
            POBoxInfo info = mailInventory.getPOBoxInfo();
            NetworkUtil.sendToPlayer(new PacketPOBoxInfoResponse(info), player);
        }
    }
    return stack;
}
Also used : PacketPOBoxInfoResponse(forestry.mail.network.packets.PacketPOBoxInfoResponse) POBoxInfo(forestry.mail.POBoxInfo) ItemStack(net.minecraft.item.ItemStack)

Aggregations

POBoxInfo (forestry.mail.POBoxInfo)1 PacketPOBoxInfoResponse (forestry.mail.network.packets.PacketPOBoxInfoResponse)1 ItemStack (net.minecraft.item.ItemStack)1