-
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add option for sponges to absorb water from mud
- Loading branch information
Showing
59 changed files
with
280 additions
and
266 deletions.
There are no files selected for viewing
24 changes: 19 additions & 5 deletions
24
...-Option-for-sponges-to-work-on-lava.patch → ...for-sponges-to-work-on-lava-and-mud.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,49 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: 12emin34 <macanovic.emin@gmail.com> | ||
Date: Sat, 7 Aug 2021 20:23:31 +0200 | ||
Subject: [PATCH] Option for sponges to work on lava | ||
Subject: [PATCH] Option for sponges to work on lava and mud | ||
|
||
Co-authored by: granny <granny@purpurmc.org> | ||
|
||
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 709dd0af07f2439d7c7e8b5cd0677580dc3f6278..aebbe06cffed662f07c2c48cf1ba3a8a0b57aa55 100644 | ||
index 709dd0af07f2439d7c7e8b5cd0677580dc3f6278..2276fed1feb4fea59b5bd49b5e4586d49478b3cc 100644 | ||
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java | ||
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java | ||
@@ -67,7 +67,7 @@ public class SpongeBlock extends Block { | ||
FluidState fluid = blockList.getFluidState(blockposition1); | ||
// CraftBukkit end | ||
|
||
- if (!fluid.is(FluidTags.WATER)) { | ||
+ if (!fluid.is(FluidTags.WATER) && (!world.purpurConfig.spongeAbsorbsLava || !fluid.is(FluidTags.LAVA))) { // Purpur | ||
+ if (!fluid.is(FluidTags.WATER) && (!world.purpurConfig.spongeAbsorbsLava || !fluid.is(FluidTags.LAVA)) && (!world.purpurConfig.spongeAbsorbsWaterFromMud || !iblockdata.is(Blocks.MUD))) { // Purpur | ||
return false; | ||
} else { | ||
Block block = iblockdata.getBlock(); | ||
@@ -82,6 +82,10 @@ public class SpongeBlock extends Block { | ||
|
||
if (iblockdata.getBlock() instanceof LiquidBlock) { | ||
blockList.setBlock(blockposition1, Blocks.AIR.defaultBlockState(), 3); // CraftBukkit | ||
+ // Purpur start | ||
+ } else if (iblockdata.is(Blocks.MUD)) { | ||
+ blockList.setBlock(blockposition1, Blocks.CLAY.defaultBlockState(), 3); | ||
+ // Purpur end | ||
} else { | ||
if (!iblockdata.is(Blocks.KELP) && !iblockdata.is(Blocks.KELP_PLANT) && !iblockdata.is(Blocks.SEAGRASS) && !iblockdata.is(Blocks.TALL_SEAGRASS)) { | ||
return false; | ||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
index e93efa6315cab1c83296a918cbdb049497231acb..cacb0304102e0096f609cd59478b2f0c529482e0 100644 | ||
index e93efa6315cab1c83296a918cbdb049497231acb..6ac4518a1f40a3b1feb6818e4f04efcf59fc0ece 100644 | ||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
@@ -930,9 +930,11 @@ public class PurpurWorldConfig { | ||
@@ -930,9 +930,13 @@ public class PurpurWorldConfig { | ||
|
||
public int spongeAbsorptionArea = 65; | ||
public int spongeAbsorptionRadius = 6; | ||
+ public boolean spongeAbsorbsLava = false; | ||
+ public boolean spongeAbsorbsWaterFromMud = false; | ||
private void spongeSettings() { | ||
spongeAbsorptionArea = getInt("blocks.sponge.absorption.area", spongeAbsorptionArea); | ||
spongeAbsorptionRadius = getInt("blocks.sponge.absorption.radius", spongeAbsorptionRadius); | ||
+ spongeAbsorbsLava = getBoolean("blocks.sponge.absorbs-lava", spongeAbsorbsLava); | ||
+ spongeAbsorbsWaterFromMud = getBoolean("blocks.sponge.absorbs-water-from-mud", spongeAbsorbsWaterFromMud); | ||
} | ||
|
||
public boolean turtleEggsBreakFromExpOrbs = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.