Fix change to container opening causing opening the module tweaker to crash on servers
@@ -6,7 +6,6 @@ import mekanism.common.MekanismLang;
import mekanism.common.inventory.container.ContainerProvider;
import mekanism.common.inventory.container.ModuleTweakerContainer;
import mekanism.common.network.IMekanismPacket;
-import mekanism.common.registries.MekanismContainerTypes;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.INamedContainerProvider;
@@ -39,8 +38,8 @@ public class PacketOpenGui implements IMekanismPacket {
return new PacketOpenGui(buffer.readEnum(GuiType.class));
}
- public enum GuiType {
- MODULE_TWEAKER(() -> new ContainerProvider(MekanismLang.MODULE_TWEAKER, (id, inv, player) -> MekanismContainerTypes.MODULE_TWEAKER.get().create(id, inv)),
+ public enum GuiType {//TODO - 1.18: Evaluate switching this back to MekanismContainerTypes.MODULE_TWEAKER.get().create(id, inv)
+ MODULE_TWEAKER(() -> new ContainerProvider(MekanismLang.MODULE_TWEAKER, (id, inv, player) -> new ModuleTweakerContainer(id, inv)),
ModuleTweakerContainer::hasTweakableItem);
private final Supplier<INamedContainerProvider> containerSupplier;
