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 3dcdafe18085fc8fff9eb5bb50392ba13a27b066..9cd2a05683d879f56b6e62dfd49ac30341deeb06 100644
|
|
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
|
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
|
@@ -380,10 +380,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
|
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 5fc80f67cd76bb557e2f629d91b5c6538b660d28..28681630564fa4c4527280537e334c9e62c274a7 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) {
|