This commit is contained in:
skippyall
2024-09-17 10:46:43 +02:00
parent 1dd6914454
commit d6a324a93f
3 changed files with 91 additions and 5 deletions
@@ -40,7 +40,7 @@ public class MinionGui {
.setItem(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE)
.setName(Text.translatable("minions.gui.main.modules"))
.setCallback((i, clickType, slotActionType) -> {
openModuleInventory(player, minion);
ModuleInventory.openModuleInventory(player, minion);
})
);
gui.setSlot(5, new GuiElementBuilder()
@@ -61,10 +61,6 @@ public class MinionGui {
}
public static void openModuleInventory(ServerPlayerEntity player, MinionFakePlayer minion) {
player.openHandledScreen(new SimpleNamedScreenHandlerFactory((syncId, playerInventory, player2) -> GenericContainerScreenHandler.createGeneric9x3(syncId, playerInventory, minion.getModuleInventory()), Text.translatable("")));
}
public static void openMinionInventory(ServerPlayerEntity player, MinionFakePlayer minion) {
SimpleGui gui = new SimpleGui(ScreenHandlerType.GENERIC_9X5, player, false);
gui.setTitle(Text.translatable("minions.gui.inventory.title", minion.getName()));