From 278742a569be48a21ee75da0c0f6f5b6c7e4375b Mon Sep 17 00:00:00 2001 From: 3944Realms Date: Tue, 14 Oct 2025 20:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=88=A0=E9=99=A4=E4=BA=86?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=BD=A2=E7=8A=B6=E5=B7=A5=E5=85=B7=E7=B1=BB?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../lib39/util/shape/ShapeUtil.java | 41 +------------------ 2 files changed, 3 insertions(+), 40 deletions(-) diff --git a/gradle.properties b/gradle.properties index e753691..5a5d944 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,7 @@ mod_name=3944Realms 's Lib Mod # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=MIT # The mod version. See https://semver.org/ -mod_version=0.0.6 +mod_version=0.0.7 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/top/r3944realms/lib39/util/shape/ShapeUtil.java b/src/main/java/top/r3944realms/lib39/util/shape/ShapeUtil.java index 2033e94..fe3a5db 100644 --- a/src/main/java/top/r3944realms/lib39/util/shape/ShapeUtil.java +++ b/src/main/java/top/r3944realms/lib39/util/shape/ShapeUtil.java @@ -8,6 +8,7 @@ import org.jetbrains.annotations.NotNull; import java.util.*; +@SuppressWarnings("unused") public class ShapeUtil { // ==================== 基础形状创建 ==================== @@ -38,16 +39,6 @@ public class ShapeUtil { return createRotatedDirectionMap(shape); } - /** - * 创建双部分方块的形状映射 - */ - public static Map> createTwoPartShapeMap(VoxelShape headShape, VoxelShape footShape) { - EnumMap> shapeMap = new EnumMap<>(BlockPart.class); - shapeMap.put(BlockPart.HEAD, createRotatedDirectionMap(headShape)); - shapeMap.put(BlockPart.FOOT, createRotatedDirectionMap(footShape)); - return shapeMap; - } - /** * 创建原版双方块的形状映射 */ @@ -58,17 +49,6 @@ public class ShapeUtil { return shapeMap; } - /** - * 创建三部分方块的形状映射 - */ - public static Map> createThreePartShapeMap(VoxelShape headShape, VoxelShape centerShape, VoxelShape footShape) { - EnumMap> shapeMap = new EnumMap<>(BlockSection.class); - shapeMap.put(BlockSection.HEAD, createRotatedDirectionMap(headShape)); - shapeMap.put(BlockSection.CENTER, createRotatedDirectionMap(centerShape)); - shapeMap.put(BlockSection.FOOT, createRotatedDirectionMap(footShape)); - return shapeMap; - } - // ==================== 形状旋转 ==================== /** @@ -98,6 +78,7 @@ public class ShapeUtil { /** * 绕Z轴旋转碰撞箱 */ + @SuppressWarnings("SuspiciousNameCombination") public static @NotNull VoxelShape rotateVoxelShapeZAxis(@NotNull VoxelShape shape) { final List generatedShapes = new ArrayList<>(); shape.forAllBoxes((minX, minY, minZ, maxX, maxY, maxZ) -> { @@ -160,24 +141,6 @@ public class ShapeUtil { return directionMap; } - // ==================== 枚举定义 ==================== - - /** - * 方块部分枚举(双部分方块) - */ - public enum BlockPart { - HEAD, - FOOT - } - - /** - * 方块部分枚举(三部分方块) - */ - public enum BlockSection { - HEAD, - CENTER, - FOOT - } // ==================== 便捷构建器 ====================