mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-04 15:41:31 +00:00
Renewable deepslate (#29)
This commit is contained in:
@@ -78,10 +78,10 @@ index dd95c9d931da5ee2cb3e620c71cc90d178c51fbc..d1ebe4f340c53f987a42fffcc462f2ea
|
||||
.withRequiredArg()
|
||||
diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..863396656580481e8ed3dfaa0f5b7044e652ea96
|
||||
index 0000000000000000000000000000000000000000..9b558395d65921b097fd1ab6230496c93f6c97c3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
||||
@@ -0,0 +1,870 @@
|
||||
@@ -0,0 +1,873 @@
|
||||
+package top.leavesmc.leaves;
|
||||
+
|
||||
+import com.destroystokyo.paper.util.SneakyThrow;
|
||||
@@ -543,6 +543,9 @@ index 0000000000000000000000000000000000000000..863396656580481e8ed3dfaa0f5b7044
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @GlobalConfig(name = "renewable-deepslate", category = "modify")
|
||||
+ public static boolean renewableDeepslate = false;
|
||||
+
|
||||
+ // Leaves start - modify - removed
|
||||
+
|
||||
+ @RemovedConfig
|
||||
|
||||
32
patches/server/0130-Renewable-deepslate.patch
Normal file
32
patches/server/0130-Renewable-deepslate.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Mon, 22 Jan 2024 11:15:53 +0800
|
||||
Subject: [PATCH] Renewable deepslate
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
index 2bd097203f1e92d3fc343f91dc37220e09dd5066..f1e5b270d46739d8c70d6cab0cda598af331c360 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
@@ -192,7 +192,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
||||
BlockPos blockposition1 = pos.relative(enumdirection.getOpposite());
|
||||
|
||||
if (world.getFluidState(blockposition1).is(FluidTags.WATER)) {
|
||||
- Block block = world.getFluidState(pos).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
|
||||
+ Block block = world.getFluidState(pos).isSource() ? Blocks.OBSIDIAN : (top.leavesmc.leaves.LeavesConfig.renewableDeepslate && world.dimension() == Level.OVERWORLD && pos.getY() < 0 ? Blocks.COBBLED_DEEPSLATE : Blocks.COBBLESTONE); // Leaves - renewable deepslate
|
||||
|
||||
// CraftBukkit start
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, pos, block.defaultBlockState())) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/LavaFluid.java b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
||||
index 3bb4a9a1a6249e8ba2de237f801210e7f4fd5825..f9d386db467b608430b3abcfc609594db8a29b76 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
||||
@@ -211,7 +211,7 @@ public abstract class LavaFluid extends FlowingFluid {
|
||||
if (this.is(FluidTags.LAVA) && fluid1.is(FluidTags.WATER)) {
|
||||
if (state.getBlock() instanceof LiquidBlock) {
|
||||
// CraftBukkit start
|
||||
- if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world.getMinecraftWorld(), pos, Blocks.STONE.defaultBlockState(), 3)) {
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world.getMinecraftWorld(), pos, top.leavesmc.leaves.LeavesConfig.renewableDeepslate && world.getMinecraftWorld().dimension() == Level.OVERWORLD && pos.getY() < 0 ? Blocks.DEEPSLATE.defaultBlockState() : Blocks.STONE.defaultBlockState(), 3)) { // Leaves - renewable deepslate
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
Reference in New Issue
Block a user