I've gone through all the mixins in Terraform API and tried to consolidate the style and modernize, particularly with an eye to mod compatibility. Programming being what it is, probably nobody will completely agree with my style; here's your chance to change it. :P
There are a couple of behavioral changes here also. For example, we have not synced the game event in FarmlandBlock.setToDirt() like vanilla does; now we will. PathBlock now relies on FarmlandBlock.setToDirt() (no longer overriding what vanilla does), consolidating the block conversion and entity handling into a single code pathway which relies on the expansion of TerraformDirtRegistry.getFromWorld() behavior. The Redirect of map.get() in MixinBoatEntityRenderer has been changed to a WrapOperation, which improves compatibility but does mean we will execute vanilla code we did not execute previously.
Deprecate 2-arg DirtPathBlock constructor in favor of new one-arg (like FarmlandBlock)
TerraformDirtRegistry.getFromWorld now finds any DirtBlocks variant (added farmland and path)
Follow vanilla changes in MixinFarmlandBlock
Consolidate mixin code style (likely to spur some debate)
Update to WrapOperation: MixinAnimalEntity.spawnOnCustomGrass, MixinSugarCaneBlock.canPlaceOnSoil, MixinBoatEntityRenderer.getBoatTextureAndModel
I discovered our Farmland blocks don't support gourd growth while researching #22 and I have fixed this with a mixin to StemBlock. While checking other uses of Blocks.FARMLAND I noticed we have a lot of mixins to different instances of BlockState.isOf(Blocks.FARMLAND) and there is little consistency in how they are implemented. a7d4e81 makes all these implementations alike.
Allow gourds to grow onto our Farmland blocks
Allow pitcher plants to be planted on our Farmland blocks
Refactor Farmland mixins a bit more to be consistent
I've gone through all the mixins in Terraform API and tried to consolidate the style and modernize, particularly with an eye to mod compatibility. Programming being what it is, probably nobody will completely agree with my style; here's your chance to change it. :P
There are a couple of behavioral changes here also. For example, we have not synced the game event in
FarmlandBlock.setToDirt()
like vanilla does; now we will. PathBlock now relies onFarmlandBlock.setToDirt()
(no longer overriding what vanilla does), consolidating the block conversion and entity handling into a single code pathway which relies on the expansion ofTerraformDirtRegistry.getFromWorld()
behavior. The Redirect ofmap.get()
inMixinBoatEntityRenderer
has been changed to a WrapOperation, which improves compatibility but does mean we will execute vanilla code we did not execute previously.I discovered our Farmland blocks don't support gourd growth while researching #22 and I have fixed this with a mixin to StemBlock. While checking other uses of Blocks.FARMLAND I noticed we have a lot of mixins to different instances of
BlockState.isOf(Blocks.FARMLAND)
and there is little consistency in how they are implemented. a7d4e81 makes all these implementations alike.