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

[1.8][Solved]Loading Variants of the same block


WitherDoggie
 Share

Recommended Posts

Do not use

ModelBakery.registerItemVariants

or

ItemModelMesher#register

. Use

ModelLoader.setCustomModelResourceLocation

(called in preInit) instead.

This is really not hard, you specify a location and a variant. This will look at the blockstate json specified by the location and the variant inside it.

Link to comment
Share on other sites

  • Replies 119
  • Created
  • Last Reply

Top Posters In This Topic

I've written this model loading code to load my variants, but the blocks still show up as un-textured blocks. The models don't load either. The log is saying that it can't find the blockstate files, but I checked and they are in the blockstate folder. What am I doing wrong?

 

ClientProxy:

http://pastebin.com/XXK2yivY

 

Log:

http://pastebin.com/ZG4ZYH6h

Link to comment
Share on other sites

Moved registerBlocks back to the CommonProxy.

 

RegisterRender.RegisterModel is what registers the models for my items.(moved that up to preInit)

 

BlockState Path

C:\Users\Evan\Desktop\forge-1.8.9-11.15.1.1890-1.8.9-mdk\src\main\resources\assets\withermod\blockstates

 

Model Path

C:\Users\Evan\Desktop\forge-1.8.9-11.15.1.1890-1.8.9-mdk\src\main\resources\assets\withermod\blocks/models/block

 

BlockState for woodWall_oak

http://pastebin.com/UuP3E5aT

 

BlockState for woodWall_spruce

http://pastebin.com/7NWf7kAB

 

Models for woodWall_oak

http://pastebin.com/YwdV1RCP

http://pastebin.com/y177VTZu

http://pastebin.com/yDSyfiY2

http://pastebin.com/0BjPGBcu

http://pastebin.com/EY78GRJw

http://pastebin.com/ZHA30tjn

http://pastebin.com/cH8pwMhy

http://pastebin.com/y4jM6QH9

http://pastebin.com/ZHYR2H8s

http://pastebin.com/Rt0nDfhQ

http://pastebin.com/svCA20b1

http://pastebin.com/zUWs1a9U

 

The model files for the spruce variant are the same except for the change in texture.

Link to comment
Share on other sites

Moved registerBlocks back to the CommonProxy.

 

RegisterRender.RegisterModel is what registers the models for my items.(moved that up to preInit)

 

BlockState Path

C:\Users\Evan\Desktop\forge-1.8.9-11.15.1.1890-1.8.9-mdk\src\main\resources\assets\withermod\blockstates

 

Model Path

C:\Users\Evan\Desktop\forge-1.8.9-11.15.1.1890-1.8.9-mdk\src\main\resources\assets\withermod\blocks/models/block

 

BlockState for woodWall_oak

http://pastebin.com/UuP3E5aT

 

BlockState for woodWall_spruce

http://pastebin.com/7NWf7kAB

 

Models for woodWall_oak

http://pastebin.com/YwdV1RCP

http://pastebin.com/y177VTZu

http://pastebin.com/yDSyfiY2

http://pastebin.com/0BjPGBcu

http://pastebin.com/EY78GRJw

http://pastebin.com/ZHA30tjn

http://pastebin.com/cH8pwMhy

http://pastebin.com/y4jM6QH9

http://pastebin.com/ZHYR2H8s

http://pastebin.com/Rt0nDfhQ

http://pastebin.com/svCA20b1

http://pastebin.com/zUWs1a9U

 

The model files for the spruce variant are the same except for the change in texture.

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




×
×
  • Create New...

Important Information

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