mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes:b33b63908eSupport complex components in written book builder (#6337)bfb3d42b44Optimize entity tracker passenger checks (#6361)399710ff79Add reobf mappings patch for MinecraftServer#getLootTables (#6368)25cd8aba9fConfig option for Piglins guarding chests (#4829)80650e8936Added EntityItemDamageEvent (#4928) Tuinity Changes:8e7cc4dc96Do not submit profile lookups to worldgen threads
This commit is contained in:
62
patches/server/0181-Configurable-sponge-absorption.patch
Normal file
62
patches/server/0181-Configurable-sponge-absorption.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Encode42 <me@encode42.dev>
|
||||
Date: Wed, 24 Mar 2021 20:30:37 -0400
|
||||
Subject: [PATCH] Configurable sponge absorption
|
||||
|
||||
Allows the total area and radius of water blocks the sponge can absorb to be changed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
||||
index 1ef8eadd4e59f2e5d2bbd84f6f9bcf37b59db5bd..5b10e1110f938745c8f9ed0b55960566bc720c30 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
||||
@@ -77,13 +77,13 @@ public class SpongeBlock extends Block {
|
||||
if (fluid.is((Tag) FluidTags.WATER)) {
|
||||
if (iblockdata.getBlock() instanceof BucketPickup && !((BucketPickup) iblockdata.getBlock()).pickupBlock(blockList, blockposition2, iblockdata).isEmpty()) { // CraftBukkit
|
||||
++i;
|
||||
- if (j < 6) {
|
||||
+ if (j < world.purpurConfig.spongeAbsorptionRadius) { // Purpur
|
||||
queue.add(new Tuple<>(blockposition2, j + 1));
|
||||
}
|
||||
} else if (iblockdata.getBlock() instanceof LiquidBlock) {
|
||||
blockList.setBlock(blockposition2, Blocks.AIR.defaultBlockState(), 3); // CraftBukkit
|
||||
++i;
|
||||
- if (j < 6) {
|
||||
+ if (j < world.purpurConfig.spongeAbsorptionRadius) { // Purpur
|
||||
queue.add(new Tuple<>(blockposition2, j + 1));
|
||||
}
|
||||
} else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
||||
@@ -94,14 +94,14 @@ public class SpongeBlock extends Block {
|
||||
blockList.setBlock(blockposition2, Blocks.AIR.defaultBlockState(), 3);
|
||||
// CraftBukkit end
|
||||
++i;
|
||||
- if (j < 6) {
|
||||
+ if (j < world.purpurConfig.spongeAbsorptionRadius) { // Purpur
|
||||
queue.add(new Tuple<>(blockposition2, j + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- if (i > 64) {
|
||||
+ if (i > world.purpurConfig.spongeAbsorptionArea) { // Purpur
|
||||
break;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index cd37fef11cb6469718019d989a10e2e81a9d8b93..9bdb8ffe7c7bad23d4a2b2283931e683269cca20 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -638,6 +638,13 @@ public class PurpurWorldConfig {
|
||||
spawnerDeactivateByRedstone = getBoolean("blocks.spawner.deactivate-by-redstone", spawnerDeactivateByRedstone);
|
||||
}
|
||||
|
||||
+ public int spongeAbsorptionArea = 64;
|
||||
+ public int spongeAbsorptionRadius = 6;
|
||||
+ private void spongeSettings() {
|
||||
+ spongeAbsorptionArea = getInt("blocks.sponge.absorption.area", spongeAbsorptionArea);
|
||||
+ spongeAbsorptionRadius = getInt("blocks.sponge.absorption.radius", spongeAbsorptionRadius);
|
||||
+ }
|
||||
+
|
||||
public float stonecutterDamage = 0.0F;
|
||||
private void stonecutterSettings() {
|
||||
stonecutterDamage = (float) getDouble("blocks.stonecutter.damage", stonecutterDamage);
|
||||
Reference in New Issue
Block a user