mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-21 15:59:26 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@dc3ef2a Fix vanilla components not being translated (#9893) PaperMC/Paper@7e15d97 Remove no longer needed diff from adventure patch PaperMC/Paper@f1820dc Fix incorrect border collision detection PaperMC/Paper@de04cbc Updated Upstream (Bukkit/CraftBukkit) (#10034) PaperMC/Paper@ff26d54 send sound and particle packets immediately even if off main (#10033) PaperMC/Paper@e3140fb hotfix spawning item/xp in wrong spot PaperMC/Paper@0b95298 Make worldborder collisions consistent with Vanilla PaperMC/Paper@47b2c18 Don't fire the drop event on player deaths (#10046) PaperMC/Paper@8c007d9 properly read and store sus effect duration (#10050) PaperMC/Paper@5385b21 [ci skip] Make test results viewable in-browser and downloadable (#10055) PaperMC/Paper@086ca61 Fix world border edge collision (#10053) PaperMC/Paper@45e01a2 Use correct max stack size in crafter (#10057) PaperMC/Paper@d11a588 Remove duplicate code in chunk tick iteration (#10056) PaperMC/Paper@b4c9e7e add missing Experimental annotations (#10012)
54 lines
3.7 KiB
Diff
54 lines
3.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
|
|
Date: Sat, 2 Dec 2023 15:14:15 +0000
|
|
Subject: [PATCH] Add option for legacy lava block formation
|
|
|
|
|
|
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 2fe44dae063eb0cd7d4813fb6b2937830d432e51..aaac136acbef15a1925b4b6e8da7bfc4f75360de 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
|
@@ -199,7 +199,15 @@ public class LiquidBlock extends Block implements BucketPickup {
|
|
if (fluidState.isSource()) {
|
|
block = Blocks.OBSIDIAN;
|
|
} else {
|
|
- final me.samsuik.sakura.physics.PhysicsVersion physics = world.localConfig().config(pos).physicsVersion;
|
|
+ // Sakura start - legacy block formation
|
|
+ final me.samsuik.sakura.physics.PhysicsVersion physics;
|
|
+
|
|
+ if (world.sakuraConfig().environment.blockGeneration.legacyBlockFormation) {
|
|
+ physics = me.samsuik.sakura.physics.PhysicsVersion.v1_12;
|
|
+ } else {
|
|
+ physics = world.localConfig().config(pos).physicsVersion;
|
|
+ }
|
|
+ // Sakura end
|
|
|
|
// SANITY: In legacy a patch by paper removes the fluid level condition from vanilla.
|
|
if (physics.afterOrEqual(1_16_0) || physics.isLegacy()
|
|
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 cae1adf85ff35947a9747a21ff887a2ec0a4367a..56dcba3560fb13be9d13b400aea681de98ca800d 100644
|
|
--- a/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
|
+++ b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
|
@@ -177,7 +177,7 @@ public abstract class LavaFluid extends FlowingFluid {
|
|
public boolean canBeReplacedWith(FluidState state, BlockGetter world, BlockPos pos, Fluid fluid, Direction direction) {
|
|
// Sakura start
|
|
return state.getHeight(world, pos) >= 0.44444445F && fluid.is(FluidTags.WATER)
|
|
- && world instanceof Level level && level.localConfig().config(pos).physicsVersion.afterOrEqual(1_13_0);
|
|
+ && world instanceof Level level && !level.sakuraConfig().environment.blockGeneration.legacyBlockFormation && level.localConfig().config(pos).physicsVersion.afterOrEqual(1_13_0);
|
|
// Sakura end
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/material/WaterFluid.java b/src/main/java/net/minecraft/world/level/material/WaterFluid.java
|
|
index 521b8084e490d5f3ecacd1d7368dddee22647aa9..7987b45130e2eeba1dca4bc8bba9efe0cd8b209c 100644
|
|
--- a/src/main/java/net/minecraft/world/level/material/WaterFluid.java
|
|
+++ b/src/main/java/net/minecraft/world/level/material/WaterFluid.java
|
|
@@ -106,7 +106,7 @@ public abstract class WaterFluid extends FlowingFluid {
|
|
public boolean canBeReplacedWith(FluidState state, BlockGetter world, BlockPos pos, Fluid fluid, Direction direction) {
|
|
// Sakura start
|
|
return direction == Direction.DOWN && !fluid.is(FluidTags.WATER)
|
|
- || fluid.is(FluidTags.LAVA) && world instanceof Level level && level.localConfig().config(pos).physicsVersion.before(1_13_0);
|
|
+ || fluid.is(FluidTags.LAVA) && world instanceof Level level && (level.sakuraConfig().environment.blockGeneration.legacyBlockFormation || level.localConfig().config(pos).physicsVersion.before(1_13_0));
|
|
// Sakura end
|
|
}
|
|
|