/** * Enchants the item identified by the packet given some convoluted conditions (matching window, which * should/shouldn't be in use?) */ public void processEnchantItem(CPacketEnchantItem packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerWorld()); this.playerEntity.markPlayerActive(); if (this.playerEntity.openContainer.windowId == packetIn.getWindowId() && this.playerEntity.openContainer.getCanCraft(this.playerEntity) && !this.playerEntity.isSpectator()) { this.playerEntity.openContainer.enchantItem(this.playerEntity, packetIn.getButton()); this.playerEntity.openContainer.detectAndSendChanges(); } }
/** * GuiEnchantment uses this during multiplayer to tell PlayerControllerMP to send a packet indicating the * enchantment action the player has taken. */ public void sendEnchantPacket(int windowID, int button) { this.connection.sendPacket(new CPacketEnchantItem(windowID, button)); }
@Override public void processEnchantItem(CPacketEnchantItem p_147338_1_) { }
@Override public void processEnchantItem(@Nonnull CPacketEnchantItem p_147338_1_) { }
@Override public void processEnchantItem(CPacketEnchantItem packetIn) { }
/** * Enchants the item identified by the packet given some convoluted conditions (matching window, which * should/shouldn't be in use?) */ void processEnchantItem(CPacketEnchantItem packetIn);