mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
51 lines
3.1 KiB
Diff
51 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Wed, 27 Aug 2025 22:48:22 +0300
|
|
Subject: [PATCH] lithium: combined_heightmap_update
|
|
|
|
This patch is based on the following mixins:
|
|
* "net/caffeinemc/mods/lithium/mixin/world/combined_heightmap_update/LevelChunkMixin"
|
|
By: 2No2Name <2No2Name@web.de>
|
|
As part of: Lithium (https://github.com/CaffeineMC/lithium)
|
|
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
|
|
|
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
|
index 9b8aa40984d87ab1078fe71b5ccc0ca04f67a55c..acddfe7fdd4305ba832af62d607a06213b29469d 100644
|
|
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
|
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
|
@@ -389,10 +389,13 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
|
return null;
|
|
} else {
|
|
Block block = state.getBlock();
|
|
- this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING).update(i, y, i2, state);
|
|
- this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES).update(i, y, i2, state);
|
|
- this.heightmaps.get(Heightmap.Types.OCEAN_FLOOR).update(i, y, i2, state);
|
|
- this.heightmaps.get(Heightmap.Types.WORLD_SURFACE).update(i, y, i2, state);
|
|
+ // DivineMC start - lithium: combined_heightmap_update
|
|
+ Heightmap heightmap0 = this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING);
|
|
+ Heightmap heightmap1 = this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES);
|
|
+ Heightmap heightmap2 = this.heightmaps.get(Heightmap.Types.OCEAN_FLOOR);
|
|
+ Heightmap heightmap3 = this.heightmaps.get(Heightmap.Types.WORLD_SURFACE);
|
|
+ net.caffeinemc.mods.lithium.common.world.chunk.heightmap.CombinedHeightmapUpdate.updateHeightmaps(heightmap0, heightmap1, heightmap2, heightmap3, this, i, y, i2, state);
|
|
+ // DivineMC end - lithium: combined_heightmap_update
|
|
boolean hasOnlyAir1 = section.hasOnlyAir();
|
|
if (hasOnlyAir != hasOnlyAir1) {
|
|
this.level.getChunkSource().getLightEngine().updateSectionStatus(pos, hasOnlyAir1);
|
|
diff --git a/net/minecraft/world/level/levelgen/Heightmap.java b/net/minecraft/world/level/levelgen/Heightmap.java
|
|
index b53853c2b8ec79a4dcdf66f7995540e59ddee356..e30f24788adc8160739a714e3519acb0ae7ee3b5 100644
|
|
--- a/net/minecraft/world/level/levelgen/Heightmap.java
|
|
+++ b/net/minecraft/world/level/levelgen/Heightmap.java
|
|
@@ -123,6 +123,12 @@ public class Heightmap {
|
|
this.data.set(getIndex(x, z), value - this.chunk.getMinY());
|
|
}
|
|
|
|
+ // DivineMC start - lithium: combined_heightmap_update
|
|
+ public final Predicate<BlockState> isOpaque() {
|
|
+ return this.isOpaque;
|
|
+ }
|
|
+ // DivineMC end - lithium: combined_heightmap_update
|
|
+
|
|
public void setRawData(ChunkAccess chunk, Heightmap.Types type, long[] data) {
|
|
long[] raw = this.data.getRaw();
|
|
if (raw.length == data.length) {
|