and in the TileEntityRenderer instead of Model.Renderpart("Food"); ##Like it used to be
I put OBJModel.OBJProperty.valueOf("Food"); ?
if this sounds like I'm not trying I apologize but after looking over the example I'm kind of getting that it may work off of a form of MetaData? which I figured got removed.
I'll keep trying to make sense of it but atm I'm kind of lacking a bit in understanding how this is supposed to render the model part by part
That's almost entirely incorrect.
You first need to call OBJLoader.instance.addDomain with your resource domain (lowercase mod ID) to allow OBJ models to be loaded from it. You can then call ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition to tell Minecraft which model to use for your Item.
To show and hide model parts, you need to override Block#createBlockState to create and return an ExtendedBlockState that includes OBJModel.OBJProperty.instance. You also need to override Block#getExtendedState to cast the IBlockState argument to IExtendedBlockState and set the value of OBJModel.OBJProperty.instance to a new OBJState instance that shows the appropriate model parts. The OBJState constructor takes a list of group names to set the visibility of and the visibility to set for them (true to show, false to hide).
You may also need to call World#markBlockRangeForRenderUpdate whenever the visible groups change.
The example I linked stores the list of visible groups in the TileEntity and uses continuous numeric names for its groups so it can easily decide which groups to show based on the counter.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You first need to call OBJLoader.instance.addDomain with your resource domain (lowercase mod ID) to allow OBJ models to be loaded from it. You can then call ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition to tell Minecraft which model to use for your Item.
To show and hide model parts, you need to override Block#createBlockState to create and return an ExtendedBlockState that includes OBJModel.OBJProperty.instance. You also need to override Block#getExtendedState to cast the IBlockState argument to IExtendedBlockState and set the value of OBJModel.OBJProperty.instance to a new OBJState instance that shows the appropriate model parts. The OBJState constructor takes a list of group names to set the visibility of and the visibility to set for them (true to show, false to hide).
You may also need to call World#markBlockRangeForRenderUpdate whenever the visible groups change.
The example I linked stores the list of visible groups in the TileEntity and uses continuous numeric names for its groups so it can easily decide which groups to show based on the counter.
Alright... I think I'm understanding, I'll re look everything. Thanks for the explanation!
That's almost entirely incorrect.
You first need to call OBJLoader.instance.addDomain with your resource domain (lowercase mod ID) to allow OBJ models to be loaded from it. You can then call ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition to tell Minecraft which model to use for your Item.
To show and hide model parts, you need to override Block#createBlockState to create and return an ExtendedBlockState that includes OBJModel.OBJProperty.instance. You also need to override Block#getExtendedState to cast the IBlockState argument to IExtendedBlockState and set the value of OBJModel.OBJProperty.instance to a new OBJState instance that shows the appropriate model parts. The OBJState constructor takes a list of group names to set the visibility of and the visibility to set for them (true to show, false to hide).
You may also need to call World#markBlockRangeForRenderUpdate whenever the visible groups change.
The example I linked stores the list of visible groups in the TileEntity and uses continuous numeric names for its groups so it can easily decide which groups to show based on the counter.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Alright... I think I'm understanding, I'll re look everything. Thanks for the explanation!
- snubmansters.com