Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible change title on 1.19.4 #25

Closed
Spliterash opened this issue Mar 25, 2023 · 1 comment
Closed

Impossible change title on 1.19.4 #25

Spliterash opened this issue Mar 25, 2023 · 1 comment

Comments

@Spliterash
Copy link

Spliterash commented Mar 25, 2023

I get this error when trying update inventory title.

[DefaultDispatcher-worker-21/WARN]: java.lang.UnsupportedOperationException: Unable to construct this menu by type
[DefaultDispatcher-worker-21/WARN]: 	at net.minecraft.world.inventory.Container.a(Container.java:126)
[DefaultDispatcher-worker-21/WARN]: 	at MtDialog-1.0.0.jar//ru.minetopia.mtdialog.shadow.invui.inventoryaccess.r13.InventoryUtilsImpl.updateOpenInventoryTitle(InventoryUtilsImpl.java:69)
[DefaultDispatcher-worker-21/WARN]: 	at MtDialog-1.0.0.jar//ru.minetopia.mtdialog.shadow.invui.invui.window.AbstractWindow.changeTitle(AbstractWindow.java:306)

GUI Init code

val gui = Gui.normal()
    .setStructure(
        ". . . . . . . . .",
        ". . . . . . . . .",
        ". . . . . . . . .",

        ". . . . . . . . .",
        "0 0 0 0 . 1 1 1 1",
        ". . . . . . . . .",
        "2 2 2 2 . 3 3 3 3",
    )
    .apply {
        repeat(4) { i ->
            addIngredient(i.digitToChar(), SimpleItem(item(i)) { click(i) })
        }
    }
    .build()

window = Window
    .merged()
    .setGui(gui)
    .setTitle(AdventureComponentWrapper(createBuilder().build()))
    .build(player)

Title change code

window.changeTitle(AdventureComponentWrapper(builder.build()))

Server: Pufferfish 1.19.4
InvUI: xyz.xenondevs.invui:invui:1.0-SNAPSHOT

@Spliterash
Copy link
Author

I dont know why, but problem exist only in first 1-2 minute, after server start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant