
Rocks replacing log
KostromDan opened this issue ยท 4 comments
At one point I fixed this, no idea what version though. But closing as stale
@OrderedChaos-Dev
On 1.19.2, it is still not fixed.
I assume it's because 1.19.2 has been abandoned.
Can you specify which commit fixed it, so I can backport the patch via datapack, mixins, or a PR?
This is an important issue for my modpack.
Done:
@Mixin(RocksGroundcoverFeature.class)
public class RocksGroundcoverFeatureMixin {
@Inject(
at = @At("HEAD"),
method = "place",
cancellable = true
)
private void beforePlace(FeaturePlaceContext<RandomPatchConfiguration> context, CallbackInfoReturnable<Boolean> cir) {
BlockPos origin = context.origin();
WorldGenLevel level = context.level();
BlockState originState = level.getBlockState(origin);
if (!originState.getMaterial().isReplaceable() && !level.isEmptyBlock(origin)) {
cir.setReturnValue(false);
cir.cancel();
}
}
}