Making deepslate generate below y=0, not y=16 (#1433)

* Fixes #1431

* Updating carpet rule description

* Making it work for cobbled deepslate
This commit is contained in:
Ghoulboy authored and GitHub committed 2022-05-11 19:56:25 +02:00
1 parent e5a3cdf929
commit 648ea01d15
3 files changed
+3 -4

No files matched your search

@@ -22,7 +22,7 @@ public abstract class LavaFluid_renewableDeepslateMixin {
@Inject(method = "spreadTo", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/Block;defaultBlockState()Lnet/minecraft/world/level/block/state/BlockState;"), cancellable = true)
private void generateDeepslate(LevelAccessor world, BlockPos pos, BlockState state, Direction direction, FluidState fluidState, CallbackInfo ci)
{
if(CarpetSettings.renewableDeepslate && ((Level)world).dimension() == Level.OVERWORLD && pos.getY() < 16)
if(CarpetSettings.renewableDeepslate && ((Level)world).dimension() == Level.OVERWORLD && pos.getY() < 0)
{
world.setBlock(pos, Blocks.DEEPSLATE.defaultBlockState(), 3);
this.fizz(world, pos);
@@ -21,7 +21,7 @@ public abstract class LiquidBlock_renewableDeepslateMixin {
@Inject(method = "shouldSpreadLiquid", at = @At(value = "INVOKE",target = "Lnet/minecraft/world/level/material/FluidState;isSource()Z"), cancellable = true)
private void receiveFluidToDeepslate(Level world, BlockPos pos, BlockState state, CallbackInfoReturnable<Boolean> cir)
{
if(CarpetSettings.renewableDeepslate && !world.getFluidState(pos).isSource() && world.dimension() == Level.OVERWORLD && pos.getY() < 16)
if(CarpetSettings.renewableDeepslate && !world.getFluidState(pos).isSource() && world.dimension() == Level.OVERWORLD && pos.getY() < 0)
{
world.setBlockAndUpdate(pos, Blocks.COBBLED_DEEPSLATE.defaultBlockState());
this.fizz(world, pos);