[Fabric 1.16.x] BYG prevents trees from growing on vanilla dirt
coderbot16 opened this issue ยท 4 comments
Since FeatureMixin always sets the return value, this means that when block == Blocks.DIRT
, isSoil will end up returning false. Instead, It should check if the block is an instance of a BYG dirt block, and if so, set the return value to true. This avoids inadvertently changing an existing return value of true
to false
.
@Mixin(Feature.class)
public class FeatureMixin {
@Inject(at = @At("RETURN"), method = "isSoil(Lnet/minecraft/block/Block;)Z", cancellable = true)
private static void isDirt(Block block, CallbackInfoReturnable<Boolean> cir) {
- cir.setReturnValue(block == BYGBlockList.GLOWCELIUM || block == BYGBlockList.PEAT ||
+ if (block == BYGBlockList.GLOWCELIUM || block == BYGBlockList.PEAT ||
block == BYGBlockList.MEADOW_GRASSBLOCK || block == BYGBlockList.OVERGROWN_DACITE || block == BYGBlockList.OVERGROWN_STONE ||
block == BYGBlockList.PODZOL_DACITE || block == BYGBlockList.OVERGROWN_NETHERRACK || block == BYGBlockList.SYTHIAN_NYLIUM ||
- block == BYGBlockList.IVIS_PHYLIUM);
+ block == BYGBlockList.IVIS_PHYLIUM) {
+ cir.setReturnValue(true);
+ }
}
}
The effect of this is most notable with Terrestria installed:
Haha yes my noob self has fixed/patched this :P https://www.curseforge.com/minecraft/mc-mods/oh-the-biomes-youll-go-fabric/files/2992185