SPIGOT-7170: Cannot set slots in custom smithing inventory

This commit is contained in:
md_5 2022-10-28 20:33:21 +11:00
parent 48f3a2258b
commit f43634ae43
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -20,7 +20,6 @@ import net.minecraft.world.inventory.ContainerLoom;
import net.minecraft.world.inventory.ContainerMerchant; import net.minecraft.world.inventory.ContainerMerchant;
import net.minecraft.world.inventory.ContainerProperties; import net.minecraft.world.inventory.ContainerProperties;
import net.minecraft.world.inventory.ContainerShulkerBox; import net.minecraft.world.inventory.ContainerShulkerBox;
import net.minecraft.world.inventory.ContainerSmithing;
import net.minecraft.world.inventory.ContainerSmoker; import net.minecraft.world.inventory.ContainerSmoker;
import net.minecraft.world.inventory.ContainerStonecutter; import net.minecraft.world.inventory.ContainerStonecutter;
import net.minecraft.world.inventory.ContainerWorkbench; import net.minecraft.world.inventory.ContainerWorkbench;
@ -183,10 +182,8 @@ public class CraftContainer extends Container {
delegate = new ContainerHopper(windowId, bottom, top); delegate = new ContainerHopper(windowId, bottom, top);
break; break;
case ANVIL: case ANVIL:
setupAnvil(top, bottom); // SPIGOT-6783 - manually set up slots so we can use the delegated inventory and not the automatically created one
break;
case SMITHING: case SMITHING:
delegate = new ContainerSmithing(windowId, bottom); setupAnvil(top, bottom); // SPIGOT-6783 - manually set up slots so we can use the delegated inventory and not the automatically created one
break; break;
case BEACON: case BEACON:
delegate = new ContainerBeacon(windowId, bottom); delegate = new ContainerBeacon(windowId, bottom);