From 5f2634caa24e347bed231e0aa488cdd9e38a493c Mon Sep 17 00:00:00 2001 From: XiaoMoMi <972454774@qq.com> Date: Mon, 13 Oct 2025 17:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E4=B8=80=E4=B8=8B=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E9=98=B4=E5=BD=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/network/BukkitNetworkManager.java | 14 +++++++++----- .../models/block/custom/magma_plant_stage_0.json | 2 ++ .../models/block/custom/magma_plant_stage_1.json | 2 ++ .../models/block/custom/magma_plant_stage_2.json | 2 ++ .../models/block/custom/magma_plant_stage_3.json | 8 ++++++++ gradle.properties | 2 +- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/network/BukkitNetworkManager.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/network/BukkitNetworkManager.java index 2c7e830bf..3c5d6e10d 100644 --- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/network/BukkitNetworkManager.java +++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/network/BukkitNetworkManager.java @@ -120,6 +120,7 @@ import java.nio.charset.StandardCharsets; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiConsumer; +import java.util.function.BiFunction; public class BukkitNetworkManager implements NetworkManager, Listener, PluginMessageListener { private static BukkitNetworkManager instance; @@ -1911,16 +1912,17 @@ public class BukkitNetworkManager implements NetworkManager, Listener, PluginMes } public static class LevelChunkWithLightListener implements ByteBufferPacketListener { - private static BiConsumer> biomeRemapper = null; + private static BiFunction, Boolean> biomeRemapper = null; - public static void setBiomeRemapper(BiConsumer> remapper) { + public static void setBiomeRemapper(BiFunction, Boolean> remapper) { biomeRemapper = remapper; } - public static void remapBiomes(NetWorkUser user, PalettedContainer biomes) { + public static boolean remapBiomes(NetWorkUser user, PalettedContainer biomes) { if (biomeRemapper != null) { - biomeRemapper.accept(user, biomes); + return biomeRemapper.apply(user, biomes); } + return false; } private final int[] blockStateMapper; @@ -1978,7 +1980,9 @@ public class BukkitNetworkManager implements NetworkManager, Listener, PluginMes MCSection mcSection = new MCSection(user.clientBlockList(), this.blockList, this.biomeList); mcSection.readPacket(chunkDataByteBuf); PalettedContainer container = mcSection.blockStateContainer(); - remapBiomes(user, mcSection.biomeContainer()); + if (remapBiomes(user, mcSection.biomeContainer())) { + hasChangedAnyBlock = true; + } Palette palette = container.data().palette(); if (palette.canRemap()) { if (palette.remapAndCheck(s -> this.blockStateMapper[s])) { diff --git a/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_0.json b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_0.json index 012bd99d2..69ce63e7f 100644 --- a/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_0.json +++ b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_0.json @@ -8,6 +8,7 @@ "from": [8, 0, 0], "to": [8, 8, 16], "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "shade": false, "faces": { "north": {"uv": [0, 0, 0, 4], "texture": "#0"}, "east": {"uv": [0, 4, 8, 8], "texture": "#0"}, @@ -21,6 +22,7 @@ "from": [8, 0, 0], "to": [8, 8, 16], "rotation": {"angle": -45, "axis": "y", "origin": [8, 8, 8]}, + "shade": false, "faces": { "north": {"uv": [0, 0, 0, 4], "texture": "#0"}, "east": {"uv": [0, 4, 8, 8], "texture": "#0"}, diff --git a/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_1.json b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_1.json index 35fe79caa..014cb5330 100644 --- a/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_1.json +++ b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_1.json @@ -8,6 +8,7 @@ "from": [8, 0, 0], "to": [8, 16, 16], "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "shade": false, "faces": { "north": {"uv": [0, 0, 0, 4], "texture": "#0"}, "east": {"uv": [16, 0, 8, 8], "texture": "#0"}, @@ -21,6 +22,7 @@ "from": [0, 0, 8], "to": [16, 16, 8], "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "shade": false, "faces": { "north": {"uv": [16, 0, 8, 8], "texture": "#0"}, "east": {"uv": [0, 0, 0, 4], "texture": "#0"}, diff --git a/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_2.json b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_2.json index e790af66a..702fa6787 100644 --- a/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_2.json +++ b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_2.json @@ -8,6 +8,7 @@ "from": [8, 0, 0], "to": [8, 16, 16], "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "shade": false, "faces": { "north": {"uv": [0, 0, 0, 4], "texture": "#0"}, "east": {"uv": [8, 8, 0, 16], "texture": "#0"}, @@ -21,6 +22,7 @@ "from": [8, 0, 0], "to": [8, 16, 16], "rotation": {"angle": -45, "axis": "y", "origin": [8, 8, 8]}, + "shade": false, "faces": { "north": {"uv": [0, 0, 0, 4], "texture": "#0"}, "east": {"uv": [8, 8, 0, 16], "texture": "#0"}, diff --git a/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_3.json b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_3.json index 21035cdfe..871c1cc1f 100644 --- a/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_3.json +++ b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_3.json @@ -8,6 +8,7 @@ "from": [6.1, 11.1, 6.1], "to": [3.9, 8.9, 3.9], "rotation": {"angle": 0, "axis": "y", "origin": [4, 9, 6]}, + "shade": false, "faces": { "north": {"uv": [1, 2, 0, 1], "texture": "#0"}, "east": {"uv": [1, 2, 0, 1], "texture": "#0"}, @@ -21,6 +22,7 @@ "from": [4, 9, 4], "to": [6, 11, 6], "rotation": {"angle": 0, "axis": "y", "origin": [4, 9, 6]}, + "shade": false, "faces": { "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, "east": {"uv": [1, 0, 2, 1], "texture": "#0"}, @@ -34,6 +36,7 @@ "from": [11.1, 9.1, 11.1], "to": [8.9, 6.9, 8.9], "rotation": {"angle": 0, "axis": "y", "origin": [11, 7, 9]}, + "shade": false, "faces": { "north": {"uv": [0, 2, 1, 1], "texture": "#0"}, "east": {"uv": [0, 2, 1, 1], "texture": "#0"}, @@ -47,6 +50,7 @@ "from": [9, 7, 9], "to": [11, 9, 11], "rotation": {"angle": 0, "axis": "y", "origin": [11, 7, 9]}, + "shade": false, "faces": { "north": {"uv": [2, 0, 1, 1], "texture": "#0"}, "east": {"uv": [1, 0, 0, 1], "texture": "#0"}, @@ -60,6 +64,7 @@ "from": [6.1, 13.1, 12.1], "to": [3.9, 10.9, 9.9], "rotation": {"angle": 0, "axis": "y", "origin": [4, 11, 10]}, + "shade": false, "faces": { "north": {"uv": [1, 2, 0, 1], "texture": "#0"}, "east": {"uv": [0, 2, 1, 1], "texture": "#0"}, @@ -73,6 +78,7 @@ "from": [4, 11, 10], "to": [6, 13, 12], "rotation": {"angle": 0, "axis": "y", "origin": [4, 11, 10]}, + "shade": false, "faces": { "north": {"uv": [1, 0, 2, 1], "texture": "#0"}, "east": {"uv": [2, 0, 1, 1], "texture": "#0"}, @@ -86,6 +92,7 @@ "from": [8, 0, 0], "to": [8, 16, 16], "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "shade": false, "faces": { "north": {"uv": [12, 0, 12, 4], "texture": "#0"}, "east": {"uv": [16, 8, 8, 16], "texture": "#0"}, @@ -99,6 +106,7 @@ "from": [8, 0, 0], "to": [8, 16, 16], "rotation": {"angle": -45, "axis": "y", "origin": [8, 8, 8]}, + "shade": false, "faces": { "north": {"uv": [12, 0, 12, 4], "texture": "#0"}, "east": {"uv": [16, 8, 8, 16], "texture": "#0"}, diff --git a/gradle.properties b/gradle.properties index fdc8dc7de..6e1712ede 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx1G # Project settings # Rule: [major update].[feature update].[bug fix] -project_version=0.0.64.8 +project_version=0.0.64.9 config_version=49 lang_version=34 project_group=net.momirealms