I thought I'd make a topic that we can post all the interesting tidbits we discover from the 1.9 snapshots.
IBakedModel's getFaceQuads and getGeneralQuads methods now accept IBlockState and BlockPos as parameters. I've yet to dig through enough to discover how much Mojang is taking advantage of this, but either way, I think Forge's ISmartBlockModel can finally have a proper burial.
Items can now have states. The bow, clock, compass, and fishing rod are all examples. You specify an "overrides" section in the JSON, followed by "predicate" entries containing the state name and value, and can then specify a model to override the current one.
The item states are registered in your item class, apparently no dicking around with the ItemModelMesher or anything like you had to do with all your damage values (though you apparently still have to register the main model at least). You register states with a ResourceLocation for the state's name, associated to an instance of the new item state class. Mojang is just using inner classes in the item classes themselves to handle it. This new state class only has a single method that accepts the ItemStack, World, and EntityLivingBase, and returns a float. That float is what is used for the value in the JSON.
Item states seem useful, but if you just take a look in the JSONs for the items I mentioned, the clock and compass in particular, you'll see that they need dozens of models.
IBakedModel's getFaceQuads and getGeneralQuads methods now accept IBlockState and BlockPos as parameters. I've yet to dig through enough to discover how much Mojang is taking advantage of this, but either way, I think Forge's ISmartBlockModel can finally have a proper burial.
Items can now have states. The bow, clock, compass, and fishing rod are all examples. You specify an "overrides" section in the JSON, followed by "predicate" entries containing the state name and value, and can then specify a model to override the current one.
The item states are registered in your item class, apparently no dicking around with the ItemModelMesher or anything like you had to do with all your damage values (though you apparently still have to register the main model at least). You register states with a ResourceLocation for the state's name, associated to an instance of the new item state class. Mojang is just using inner classes in the item classes themselves to handle it. This new state class only has a single method that accepts the ItemStack, World, and EntityLivingBase, and returns a float. That float is what is used for the value in the JSON.
Item states seem useful, but if you just take a look in the JSONs for the items I mentioned, the clock and compass in particular, you'll see that they need dozens of models.