Update mixins and consolidate mixin code style. #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.