Fix crate locked slot

This commit is contained in:
abel1502 2025-06-26 19:23:38 +03:00
parent a40d0b3513
commit f820ae32e2
No known key found for this signature in database
GPG Key ID: 076926596A536338

View File

@ -25,8 +25,10 @@ public class ContainerCrateBase extends ContainerBase {
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(
invPlayer.currentItem == i ? new SlotPlayerCrateLocked(invPlayer, i, playerInvX + i * 18, playerHotbarY) :
new SlotNonRetarded(invPlayer, i, playerInvX + i * 18, playerHotbarY));
(invPlayer.currentItem == i && this.tile instanceof ItemBlockStorageCrate.InventoryCrate) ?
new SlotPlayerCrateLocked(invPlayer, i, playerInvX + i * 18, playerHotbarY) :
new SlotNonRetarded(invPlayer, i, playerInvX + i * 18, playerHotbarY)
);
}
}