Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

1.15.1 entity model problems


treblotmail
 Share

Recommended Posts

I've been struggling to create a custom entity. I used BlockBench to create the model and have fixed up some parts of it (it's not complete so there is probably some terrible code in there). I have a few questions: 

 

1. When I export the model as a .java file using BlockBench, for some reason it uses bodypart.cubeList.add() even though cubeList is private. Is there a way to get around that or is using .cubeList.add() completely wrong?

 

2. In other places of reference I've looked at, such as GirafiStudios' Waddles mod (https://github.com/GirafiStudios/Waddles/blob/master/src/main/java/com/girafi/waddles/client/model/PenguinModel.java) and McJty's examplemod (https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/entities/WeirdMobModel.java) for 1.14/1.15, they've all been using bodypart.addBox(). However, in my environment, the ModelRenderer.class doesn't even have the addBox method. When I try to use addBox Intellij says "cannot resolve addBox() in ModelRenderer" And I looked ModelRenderer up on the documentation and its totally there. What do I even do to get around this?

 

Code: https://pastebin.com/4ePXPwtz

 

If this is relevant, the forge version I am using is 1.15.1 - 30.0.50 with the default mcp mapping

 

Thanks for any help and sorry if this is very lengthy!

Link to comment
Share on other sites

Hi

I'd advise you swap to the latest forge version (not recommended), because the mcp mappings are much better.

 

It sounds like you're doing things the right way.

 

You might find this example project useful (see MBE80 and MBE21), it has some working examples of models (rendered using a TER not an entity but the ModelRenderer is the same)

https://github.com/TheGreyGhost/MinecraftByExample

 

Don't use the cubeList.add(). addBox() should work fine instead.

 

-TGG

Link to comment
Share on other sites

15 hours ago, treblotmail said:

However, in my environment, the ModelRenderer.class doesn't even have the addBox method

Try to update to the last mappings versions. 

15 hours ago, treblotmail said:

Is there a way to get around that or is using .cubeList.add() completely wrong?

Yes, here is no more a cubelist, but you simply can use the add function.

New in Modding? == Still learning!

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
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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • show the code your use for this is the Event called?, use debugger to check the values in the condition
    • if you add your Biome to the Overworld via BiomeManager#addAdditionalOverworldBiomes, you need to register your Biome via DeferredRegister or RegistryEvent unfortunately a json only Biome does not work in this case
    • use debugger to check the conditions you are using before you render your Entity
    • yes, and then post the correct logs
    • Good Morning, I tried overriding one of the vanilla rock blocks according to instructions in this old thread, but failed for the same reason the org TM did, even though I got a tiny bit farther than he did. I can remove the original block entirely from world spawn, and replace it with custom version, which I want to prevent due to following up workload(adapting recipes etc. to custom block). What I tried solving the issue/actually making replacing(partially) work: 1. I had to use the original Forge variant of registering the block in main class, like that: which actually did use the custom granite block as replacer(not exactly illustrated in the old thread), but didn't consider it on world feature generation... 2. I then believed it was due to not using correct path variables for assets texture/models/blockstates etc., so I created missing asset packets for both, vanilla asset path, and my mod path. This also did not fix the issue with creating holes filled up with Items.AIR on world feature generation. 3. I then tried to remove the vanilla granite block during feature generation, and reimported it after with my replacement set up, during feature generation as well(according to @Luis_ST advice). But the holes were still there, only this time I got my replaced granite block spawned as well. What do I want to achieve(asking myself and you in hope maybe there's a better solution)? Mojang found it a good idea, to give one of the hardest rock materials on this planet, the .harvestLevel(soft as a pillow), so I can harvest it with a wooden pickaxes(which technically is even worth, but doesn't matter since wooden "pickaxe" tools do not exist in my mod). I really just want to compare harvestLevel of any of my tools, against the harvestLevel of the targetBlock, so I can automatically disallow harvesting it, if the tool doesn't match the harvestLevel(which for whatever reason does not work as intended in 1.16.5 Minecraft). Edit: and before you shout "doPlayerHarvestCheck". Yes, I do that! Edit2: Also, why are there Manga Comic Girls, on the right upper corner of my Monitor, stating how can it be that big?(whatever "it" is?)
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.