} else if (p_75144_3_ == 4 && inventoryPlayer.getItemStack() == null && slotIndex >= 0) {
slot2 = (Slot) this.inventorySlots.get(slotIndex);
if (slot2 != null && slot2.getHasStack() && slot2.canTakeStack(player)) {
itemstack3 = slot2.decrStackSize(p_75144_2_ == 0 ? 1 : slot2.getStack().stackSize);
slot2.onPickupFromSlot(player, itemstack3);
player.dropPlayerItemWithRandomChoice(itemstack3, true);
}
} else if (p_75144_3_ == 6 && slotIndex >= 0) {
slot2 = (Slot) this.inventorySlots.get(slotIndex);
itemstack3 = inventoryPlayer.getItemStack();