修正删除了部分形状工具类的方法
This commit is contained in:
parent
b877e61c68
commit
278742a569
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<BlockPart, Map<Direction, VoxelShape>> createTwoPartShapeMap(VoxelShape headShape, VoxelShape footShape) {
|
||||
EnumMap<BlockPart, Map<Direction, VoxelShape>> 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<BlockSection, Map<Direction, VoxelShape>> createThreePartShapeMap(VoxelShape headShape, VoxelShape centerShape, VoxelShape footShape) {
|
||||
EnumMap<BlockSection, Map<Direction, VoxelShape>> 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<VoxelShape> 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
|
||||
}
|
||||
|
||||
// ==================== 便捷构建器 ====================
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user