99import net .minecraft .world .inventory .ContainerLevelAccess ;
1010import net .minecraft .world .inventory .Slot ;
1111import net .minecraft .world .item .ItemStack ;
12- import net .minecraft .world .item .Items ;
1312
1413public class ChickenSinkMenu extends AbstractContainerMenu {
1514
@@ -30,7 +29,7 @@ public ChickenSinkMenu(int windowId, Inventory playerInventory, Container contai
3029 container .startOpen (playerInventory .player );
3130
3231 for (int i = 0 ; i < 5 ; i ++) {
33- addSlot (new EggSlot (container , i , 44 + i * 18 , 20 ));
32+ addSlot (new Slot (container , i , 44 + i * 18 , 20 ));
3433 }
3534
3635
@@ -52,11 +51,11 @@ public ItemStack quickMoveStack(Player player, int slotIndex) {
5251 if (slot != null && slot .hasItem ()) {
5352 ItemStack slotStack = slot .getItem ();
5453 itemStack = slotStack .copy ();
55- if (slotIndex < 3 ) {
56- if (!moveItemStackTo (slotStack , 3 , slots .size (), true )) {
54+ if (slotIndex < 5 ) {
55+ if (!moveItemStackTo (slotStack , 5 , slots .size (), true )) {
5756 return ItemStack .EMPTY ;
5857 }
59- } else if (!moveItemStackTo (slotStack , 0 , 3 , false )) {
58+ } else if (!moveItemStackTo (slotStack , 0 , 5 , false )) {
6059 return ItemStack .EMPTY ;
6160 }
6261
@@ -81,14 +80,4 @@ public void removed(Player player) {
8180 container .stopOpen (player );
8281 }
8382
84- private static class EggSlot extends Slot {
85- public EggSlot (Container container , int slot , int x , int y ) {
86- super (container , slot , x , y );
87- }
88-
89- @ Override
90- public boolean mayPlace (ItemStack stack ) {
91- return stack .is (Items .EGG );
92- }
93- }
9483}
0 commit comments