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

How should I use ModelLoadingRegistry #3457

Closed
FishMagic opened this issue Dec 2, 2023 Discussed in #3456 · 1 comment
Closed

How should I use ModelLoadingRegistry #3457

FishMagic opened this issue Dec 2, 2023 Discussed in #3456 · 1 comment
Labels
support Issues closed due to being a support request.

Comments

@FishMagic
Copy link

Discussed in https://github.com/orgs/FabricMC/discussions/3456

Originally posted by FishMagic December 3, 2023

Description

I want to load some model by using ModelLoadingRegistry in Minecraft 1.19.2, and I try to use the code below

 ModelLoadingRegistry.INSTANCE.registerModelProvider { _, out ->
            listOf(
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_clear_soup_bubble"),
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_clear_soup"),
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_spicy_soup_bubble_small"),
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_spicy_soup_bubble_large"),
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_spicy_soup_floating_pepper_1"),
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_spicy_soup_floating_pepper_2"),
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_spicy_soup"),
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_cheese_soup_bubble"),
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_cheese_soup"),
                Identifier(EveryXHotpot.MOD_ID, "soup/hotpot_lava_soup"),
                Identifier(EveryXHotpot.MOD_ID, "item/hotpot_chopstick_model"),
                Identifier(EveryXHotpot.MOD_ID, "block/hotpot_plate_long"),
                Identifier(EveryXHotpot.MOD_ID, "block/hotpot_plate_small"),
                Identifier(EveryXHotpot.MOD_ID, "block/hotpot_chopstick_stand"),
                Identifier(EveryXHotpot.MOD_ID, "item/hotpot_spice_pack_model")
            ).forEach { out.accept(it) }

But I get some warns like Unable to load model: 'everyxhotpot:hotpot_long_plate#inventory' referenced from: everyxhotpot:hotpot_long_plate#inventory: java.lang.IllegalStateException: Circular reference while loading everyxhotpot:item/hotpot_long_plate, and get the texture missing blocks in game. So, how can I fix it.

Full code can be got here

@modmuss50 modmuss50 added the support Issues closed due to being a support request. label Dec 2, 2023
Copy link

github-actions bot commented Dec 2, 2023

👋 We use the issue tracker exclusively for final bug reports and feature requests. However, this issue appears to be better suited for either a discussion thread, or a message on our discord server. Please post your request on one of these, and the conversation can continue there.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Issues closed due to being a support request.
Projects
None yet
Development

No branches or pull requests

2 participants