mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Configurable sponge absorption
Allows the total area and radius of water blocks the sponge can absorb to be changed.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/world/level/block/SpongeBlock.java
|
||||
+++ b/net/minecraft/world/level/block/SpongeBlock.java
|
||||
@@ -53,8 +_,8 @@
|
||||
org.bukkit.craftbukkit.util.BlockStateListPopulator blockList = new org.bukkit.craftbukkit.util.BlockStateListPopulator(level); // CraftBukkit - Use BlockStateListPopulator
|
||||
BlockPos.breadthFirstTraversal(
|
||||
pos,
|
||||
- 6,
|
||||
- 65,
|
||||
+ level.purpurConfig.spongeAbsorptionRadius, // Purpur - Configurable sponge absorption
|
||||
+ level.purpurConfig.spongeAbsorptionArea, // Purpur - Configurable sponge absorption
|
||||
(validPos, queueAdder) -> {
|
||||
for (Direction direction : ALL_DIRECTIONS) {
|
||||
queueAdder.accept(validPos.relative(direction));
|
||||
@@ -583,6 +583,13 @@ public class PurpurWorldConfig {
|
||||
spawnerDeactivateByRedstone = getBoolean("blocks.spawner.deactivate-by-redstone", spawnerDeactivateByRedstone);
|
||||
}
|
||||
|
||||
public int spongeAbsorptionArea = 65;
|
||||
public int spongeAbsorptionRadius = 6;
|
||||
private void spongeSettings() {
|
||||
spongeAbsorptionArea = getInt("blocks.sponge.absorption.area", spongeAbsorptionArea);
|
||||
spongeAbsorptionRadius = getInt("blocks.sponge.absorption.radius", spongeAbsorptionRadius);
|
||||
}
|
||||
|
||||
public boolean turtleEggsBreakFromExpOrbs = false;
|
||||
public boolean turtleEggsBreakFromItems = false;
|
||||
public boolean turtleEggsBreakFromMinecarts = false;
|
||||
|
||||
Reference in New Issue
Block a user