BlakeBr0 / MysticalCustomization

Allows modpack creators to add new content and modify existing content in Mystical Agriculture.
https://blakesmods.com/mystical-customization
MIT License
6 stars 6 forks source link

[1.15.2] Just a coding question #4

Closed TheUntamed closed 3 years ago

TheUntamed commented 4 years ago

Hi,

I'm creating my own mod and I'm trying to read in .jsons to create simple items/blocks, similar to what is possible with your mod. Right now I'm trying to figure out how I can create the blockstates and models for those items/blocks. I took a look at your mod to get an idea of how it can be done but I didn't quite get through your code because its a bit more advanced with those crops and seeds etc. Can you give me some hints or do you maybe have a earlier version of your code where you tried everything out with simple items first?

BlakeBr0 commented 4 years ago

All you really need to do is load the json files prior to registering your stuff, then use the data you get from the jsons to make the items. The way I do models is relatively complex and generally not a good way to do things, but you basically have to register a model then replace the models for your custom stuff with a new instance of your model.