mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Config to not let coral die
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
|
||||
@@ -39,6 +_,7 @@
|
||||
}
|
||||
|
||||
protected static boolean scanForWater(BlockState state, BlockGetter level, BlockPos pos) {
|
||||
+ if (!((net.minecraft.world.level.LevelAccessor) level).getMinecraftWorld().purpurConfig.coralDieOutsideWater) return true; // Purpur - Config to not let coral die
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/world/level/block/CoralBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CoralBlock.java
|
||||
@@ -65,6 +_,7 @@
|
||||
}
|
||||
|
||||
protected boolean scanForWater(BlockGetter level, BlockPos pos) {
|
||||
+ if (!((net.minecraft.world.level.LevelAccessor) level).getMinecraftWorld().purpurConfig.coralDieOutsideWater) return true; // Purpur - Config to not let coral die
|
||||
for (Direction direction : Direction.values()) {
|
||||
FluidState fluidState = level.getFluidState(pos.relative(direction));
|
||||
if (fluidState.is(FluidTags.WATER)) {
|
||||
@@ -880,6 +880,11 @@ public class PurpurWorldConfig {
|
||||
composterBulkProcess = getBoolean("blocks.composter.sneak-to-bulk-process", composterBulkProcess);
|
||||
}
|
||||
|
||||
public boolean coralDieOutsideWater = true;
|
||||
private void coralSettings() {
|
||||
coralDieOutsideWater = getBoolean("blocks.coral.die-outside-water", coralDieOutsideWater);
|
||||
}
|
||||
|
||||
public boolean dispenserApplyCursedArmor = true;
|
||||
public boolean dispenserPlaceAnvils = false;
|
||||
private void dispenserSettings() {
|
||||
|
||||
Reference in New Issue
Block a user