Jump to content

[1.13.2] Baking a Model WITHOUT an assigned block?


mrburgerUS

Recommended Posts

Hi everyone,

 

I have started a new topic because I feel this issue, while related, is sufficiently different. I am able to replace the Grass model with a "wrapper" (sets which quads to provide based on world) in 

ModelBakeEvent

BUT, I have hit a wall of creating a "headless" model for the Alpha Textured Grass block. In 1.13.2, this would be easy if I just registered a new block, the system would automatically load it and everything would work. My problem is that I need to turn a JSON not associated with any block into an IBakedModel. I have spent 2 days trying to figure out how to parse and convert the JSON, but it appears everything is done behind the scenes now. Is this even possible?

For reference, ModelBlock.class has a deserialize method, should I use that?

Link to comment
Share on other sites

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

3 minutes ago, Cadiboo said:

Hi Cadiboo,

 

I have read over this before, in the days between my last post. I have created my own ModelsCache, that uses IUnbakedModel instead of IModel for the model cache, because I had issues with using it as written. As I understand it, I load the model manually in TextureStitchEvent, putting it into the Models Cache for retrieval during bake. Is this correct?

Link to comment
Share on other sites

No, as I understand it you load the textures in the texture stitch event and load and bake the models in the model bake event. This method was developed by elix_x and @Draco18s. I pretty much copied and tweaked it. Draco is more likely to know how it actually works

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

3 hours ago, Cadiboo said:

No, as I understand it you load the textures in the texture stitch event and load and bake the models in the model bake event. This method was developed by elix_x and @Draco18s. I pretty much copied and tweaked it. Draco is more likely to know how it actually works

Ah, I see. The methodology makes sense, but how do I deserialize the textures from the block's JSON for loading? ICustomModelLoader? I am not opposed to creating a Parser if I have to.

 

EDIT: Model does not have a getTextures Method anymore, only the IUnbakedModel implementation has that method.

Edited by mrburgerUS
Additional clarification.
Link to comment
Share on other sites

29 minutes ago, mrburgerUS said:

Ah, I see. The methodology makes sense, but how do I deserialize the textures from the block's JSON for loading? ICustomModelLoader? I am not opposed to creating a Parser if I have to.

 

EDIT: Model does not have a getTextures Method anymore, only the IUnbakedModel implementation has that method.

I fixed it! it ended up being a simple JSON error, I used the grass_block as an example for my model, and the 

"parent": "block/block",

line was causing parsing issues! The textures now load perfectly. Its awesome!

Link to comment
Share on other sites

4 hours ago, Cadiboo said:

No, as I understand it you load the textures in the texture stitch event and load and bake the models in the model bake event. This method was developed by elix_x and @Draco18s. I pretty much copied and tweaked it. Draco is more likely to know how it actually works

For the record I barely know how it works. There was a lot of trial and error and things would crash without any real information at to what happened.

  • Haha 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

2 minutes ago, Draco18s said:

For the record I barely know how it works. There was a lot of trial and error and things would crash without any real information at to what happened.

Exactly! This problem took 5 days to solve, but I am super please with the results. It dynamically swaps out Baked Models, and it is beautiful.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • If you’ve ever experienced the sinking feeling of losing funds online, you’re not alone. Enter recovery services like ADWARE RECOVERY SPECIALIST, the heroes of the digital age who help individuals track down and retrieve lost funds. These services act as modern-day sheriffs in the Wild West of the internet, bringing justice to those who have fallen victim to online scams and fraud. In a world where online transactions are as common as selfies, the need for recovery services is more pressing than ever. Individuals worldwide are vulnerable to various online schemes, from investment fraud to phishing scams. Recovery services provide a glimmer of hope for those who have lost money, offering a chance to recover what's rightfully theirs and restore faith in the digital realm. The beauty of recovery services like ADWARE RECOVERY SPECIALIST lies in their global reach. Email: Adwarerecoveryspecialist@auctioneer. net  Regardless of where individuals are located worldwide, these services extend their virtual arms to help victims of online fraud. From bustling metropolises to remote villages, no corner of the world is beyond the grasp of these modern-day Robin Hoods. Thanks to the wonders of globalization, recovery services have transcended geographical boundaries to serve individuals worldwide. The interconnected nature of the digital world means that help is just a click away, bridging gaps between nations and bringing relief to those in need. In a world where borders are becoming increasingly blurred, recovery services stand as beacons of accessibility and assistance. When a broker stole from me and withheld access from me for five months, I had no idea that I would be able to recover my trading money back. I'm relieved that I was able to get my money returned without any issues. The impact of recovery services like ADWARE RECOVERY SPECIALIST extends far beyond individual wallets. Communities worldwide have experienced a renewed sense of trust and security, knowing that there are dedicated professionals working tirelessly to recover their lost assets. These services not only bring financial relief but also restore faith in the integrity of the digital world. Trust is the cornerstone of any successful recovery service, and building credibility in a global market can pose unique challenges. ADWARE RECOVERY SPECIALIST strives to maintain transparency and reliability in all its interactions, earning the trust of clients worldwide. ADWARE RECOVERY SPECIALIST can be talked to through:  Website: www.adwarerecoveryspecialist.expert  Telegram: @ADWARE_RECOVERY_SPECIALIST
    • The game wont start and keeps crashing everytime I hit play "The game crashed whilst rendering overlay Error: java.lang.IllegalAccessError: failed to access class com.mojang.blaze3d.platform.GlStateManager$TextureState from class net.coderbot.iris.gl.IrisRenderSystem$DSAARB (com.mojang.blaze3d.platform.GlStateManager$TextureState is in module minecraft@1.18.2 of loader 'TRANSFORMER' @724b939e; net.coderbot.iris.gl.IrisRenderSystem$DSAARB is in module oculus@1.6.4 of loader 'TRANSFORMER' @724b939e)" How do I get it to stop? Log error here: https://pastebin.com/byv1dR54
    • In case anyone happens on this with the same issue, I was able to overcome it. After re-reading @Paint_Ninja's last post numerous time, it finally dawned on me that he was referring wholly to the forge installer, which has nothing to do with the packaged modpack installer. As such, I downloaded the new copy of the forge installer and copied it to my linux host, then opened a second ssh session and prepared a cp command to move the new (correct) installer over to the install directory where I was installing the modpack. After the modpack installer had just about finished retrieving files, I overwrote the installer.jar file with the correct one in a seperate ssh session. The modpack (packaged) installer then used that jar to install forge with the included files, and the install finished as I would have expected. Thanks all!
    • Just tried it again removed directory entirely, downloaded a brand new, fresh copy and did a fresh install, even going as far as running as root for the install to make sure I didn't hose something up permissions wise (I know its a terrible idea.), but same thing, failed install. This is making me feel mighty dumb, I must say... any help anyone could provide would be greatly appreciated.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.