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:
1 parent
e5a3cdf929
commit
648ea01d15
3 files changed
+3
-4
No files matched your search
@@ -877,8 +877,7 @@ public class CarpetSettings
|
|||||||
public static boolean renewableBlackstone = false;
|
public static boolean renewableBlackstone = false;
|
||||||
|
|
||||||
@Rule(
|
@Rule(
|
||||||
desc = "Lava and water generate deepslate and cobbled deepslate instead below Y16",
|
desc = "Lava and water generate deepslate and cobbled deepslate instead below Y0",
|
||||||
extra = "This rule may change Y value to 0 with 1.18",
|
|
||||||
category = FEATURE
|
category = FEATURE
|
||||||
)
|
)
|
||||||
public static boolean renewableDeepslate = false;
|
public static boolean renewableDeepslate = false;
|
||||||
|
|||||||
@@ -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)
|
@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)
|
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);
|
world.setBlock(pos, Blocks.DEEPSLATE.defaultBlockState(), 3);
|
||||||
this.fizz(world, pos);
|
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)
|
@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)
|
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());
|
world.setBlockAndUpdate(pos, Blocks.COBBLED_DEEPSLATE.defaultBlockState());
|
||||||
this.fizz(world, pos);
|
this.fizz(world, pos);
|
||||||
|
|||||||
Reference in new issue
Block a user