Add ability to configure frosted_ice properties
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
--- a/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||||
|
+++ b/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||||
|
@@ -42,6 +42,7 @@
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
||||||
|
+ if (!world.paperConfig().environment.frostedIce.enabled) return; // Paper - Frosted ice options
|
||||||
|
if ((random.nextInt(3) == 0 || this.fewerNeigboursThan(world, pos, 4))
|
||||||
|
&& world.getMaxLocalRawBrightness(pos) > 11 - state.getValue(AGE) - state.getLightBlock()
|
||||||
|
&& this.slightlyMelt(state, world, pos)) {
|
||||||
|
@@ -51,11 +52,11 @@
|
||||||
|
mutableBlockPos.setWithOffset(pos, direction);
|
||||||
|
BlockState blockState = world.getBlockState(mutableBlockPos);
|
||||||
|
if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) {
|
||||||
|
- world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, 20, 40));
|
||||||
|
+ world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig().environment.frostedIce.delay.min, world.paperConfig().environment.frostedIce.delay.max)); // Paper - Frosted ice options
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
- world.scheduleTick(pos, this, Mth.nextInt(random, 20, 40));
|
||||||
|
+ world.scheduleTick(pos, this, Mth.nextInt(random, world.paperConfig().environment.frostedIce.delay.min, world.paperConfig().environment.frostedIce.delay.max)); // Paper - Frosted ice options
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user