mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@c1b4899 Fix dupe uuid check on entity add (#6735) PaperMC/Paper@3f043f7 Async catch modifications to critical entity state PaperMC/Paper@bc43f40 Update jline and TCA (#6829) PaperMC/Paper@d9e2817 Update paperweight to 1.1.13 (#6866) PaperMC/Paper@3e310e0 Remove redundant and unneeded repos, reorder repos (#6867) PaperMC/Paper@485d15f Update paperweight to 1.1.14 (#6868) PaperMC/Paper@09d50a9 Added missing mappings (#6810) PaperMC/Paper@0968cdd Move async catches back to where they were (#6869) PaperMC/Paper@6f71b7c Deduplicate strings in ObfHelper (#6841) PaperMC/Paper@ada930b Updated Upstream (Bukkit/CraftBukkit) (#6872) PaperMC/Paper@06d82e0 Cache palette array (#6767) PaperMC/Paper@70fe58d Expose the potential player cause of a lightning (#6782) PaperMC/Paper@c20c9d3 Fix CraftNamespacedKey shenanigans (#6825) PaperMC/Paper@29bb5a9 Add PlayerDeathEvent#getPlayer for clarity (#6859) PaperMC/Paper@124d079 Fix issues with mob conversion (#6831) PaperMC/Paper@22b0238 Add API for checking if a zombie has the option to break doors (#6855) PaperMC/Paper@5af80b0 Add isCollidable methods to various places (#6870) PaperMC/Paper@32ba088 Fix setPatternColor on tropical fish bucket meta (#6877) PaperMC/Paper@87121ce Move `getTrackedPlayers` up from Player to Entity (#6569) PaperMC/Paper@a923e33 Make despawn distance configs per-category, improve per category spawn limit config (#6717) PaperMC/Paper@3f17694 Goat ram API (#6336) PaperMC/Paper@cc2ecbc Add Raw Byte Entity Serialization (#6826) Airplane Changes: TECHNOVE/Airplane@e47949b Ty Penple <3 TECHNOVE/Airplane@86fee6b Update upstream
63 lines
3.4 KiB
Diff
63 lines
3.4 KiB
Diff
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 da526812eb623343cd5aea849c4439414a9d6569..de88b4dc9860c386a2b407bc2703c08958433624 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -658,6 +658,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);
|