diff --git a/src/main/java/com/fureniku/metropolis/Metropolis.java b/src/main/java/com/fureniku/metropolis/Metropolis.java index 12cf9d4..07bc53d 100644 --- a/src/main/java/com/fureniku/metropolis/Metropolis.java +++ b/src/main/java/com/fureniku/metropolis/Metropolis.java @@ -17,7 +17,7 @@ public class Metropolis { public static final Logger LOGGER = LogUtils.getLogger(); public static Metropolis INSTANCE; - public static final boolean ENABLE_DEBUG = true; // For testing metropolis stuff internally. Should be disabled on release. + public static final boolean ENABLE_DEBUG = false; // For testing metropolis stuff internally. Should be disabled on release. public static RegistrationTest registrationTest; public Metropolis() { diff --git a/src/main/java/com/fureniku/metropolis/blocks/decorative/MetroBlockDecorativeBase.java b/src/main/java/com/fureniku/metropolis/blocks/decorative/MetroBlockDecorativeBase.java index af1b5fe..5ef338a 100644 --- a/src/main/java/com/fureniku/metropolis/blocks/decorative/MetroBlockDecorativeBase.java +++ b/src/main/java/com/fureniku/metropolis/blocks/decorative/MetroBlockDecorativeBase.java @@ -119,7 +119,7 @@ protected BlockState getPlacementState(BlockPlaceContext context) { @Override protected VoxelShape getShapeFromBlockState(BlockState state) { if (_rotationHelper != null && _connectHorizontalHelper != null) { - //replace with a new subhelper which generates the rotated connecting shapes on construction + //TODO replace with a new subhelper which generates the rotated connecting shapes on construction //return shape; } diff --git a/src/main/java/com/fureniku/metropolis/blocks/decorative/helpers/ConnectHorizontalHelper.java b/src/main/java/com/fureniku/metropolis/blocks/decorative/helpers/ConnectHorizontalHelper.java index 52535a1..3eeee58 100644 --- a/src/main/java/com/fureniku/metropolis/blocks/decorative/helpers/ConnectHorizontalHelper.java +++ b/src/main/java/com/fureniku/metropolis/blocks/decorative/helpers/ConnectHorizontalHelper.java @@ -130,23 +130,23 @@ private BlockState checkNewState(Level level, BlockState currentState, BlockPos private boolean checkMatchOnSide(Level level, BlockPos posToCheck, Block block, Direction dir) { if (_checkUp) { - if (checkMatch(level, posToCheck.above(), block, dir)) { + if (checkMatch(level, posToCheck.above(), block, dir, false)) { return true; } } if (_checkDown) { - if (checkMatch(level, posToCheck.below(), block, dir)) { + if (checkMatch(level, posToCheck.below(), block, dir, false)) { return true; } } - return checkMatch(level, posToCheck, block, dir); + return checkMatch(level, posToCheck, block, dir, _connectSolid); } - private boolean checkMatch(Level level, BlockPos posToCheck, Block block, Direction dir) { + private boolean checkMatch(Level level, BlockPos posToCheck, Block block, Direction dir, boolean checkSolid) { BlockState stateCheck = level.getBlockState(posToCheck); Block blockCheck = stateCheck.getBlock(); BlockConnectionType type = _connectionType; - if (_connectSolid && stateCheck.isFaceSturdy(level, posToCheck, dir.getOpposite())) { + if (checkSolid && stateCheck.isFaceSturdy(level, posToCheck, dir.getOpposite())) { return true; } diff --git a/src/main/java/com/fureniku/metropolis/datagen/MetroBlockStateProvider.java b/src/main/java/com/fureniku/metropolis/datagen/MetroBlockStateProvider.java index 063b312..1473b2c 100644 --- a/src/main/java/com/fureniku/metropolis/datagen/MetroBlockStateProvider.java +++ b/src/main/java/com/fureniku/metropolis/datagen/MetroBlockStateProvider.java @@ -147,9 +147,9 @@ public BlockModelBuilder prepareModels(Block block, String modelDir, String mode public BlockModelBuilder prepareModels(Block block, String nameSuffix, String modelDir, String modelName, TextureSet[] resources) { BlockModelBuilder bmb; if (modelName == null || resources == null) { - bmb = getModelFilesWithTexture(block, "", modelDir + block.getName(), modLoc(modelDir + block.getName())); + bmb = getModelFilesWithTexture(block, nameSuffix, modelDir + block.getName(), modLoc(modelDir + block.getName())); } else { - bmb = applyTexturesToModel(resources, getModelFilesWithTexture(block, "", modelDir + modelName, resources[0].getTexture())); + bmb = applyTexturesToModel(resources, getModelFilesWithTexture(block, nameSuffix, modelDir + modelName, resources[0].getTexture())); if (resources.length > 1) { for (int i = 1; i < resources.length; i++) { bmb = bmb.texture(resources[i].getKey(), resources[i].getTexture()); diff --git a/src/main/java/com/fureniku/metropolis/test/RegistrationTest.java b/src/main/java/com/fureniku/metropolis/test/RegistrationTest.java index c1a41de..7b2c2db 100644 --- a/src/main/java/com/fureniku/metropolis/test/RegistrationTest.java +++ b/src/main/java/com/fureniku/metropolis/test/RegistrationTest.java @@ -52,9 +52,6 @@ public void init(IEventBus modEventBus) { VoxelShape[] shapeB = ShapeUtils.makeShapes(2.5f, 4f, 16f); VoxelShape[] shapes = ShapeUtils.combineMultiShapes(shapeA, shapeB); - //TODO re-test partials (not currently working) - MetroBlockDecorativeBuilder partial = new MetroBlockDecorativeBuilder(_props).setModelDirectory("blocks/decorative/"); - blockNames.add(registerBlockSet("test_connecting_enum_same", () -> new MetroBlockDecorativeBuilder(_props) .setModelDirectory("blocks/decorative/") diff --git a/src/main/java/com/fureniku/metropolis/utils/ShapeUtils.java b/src/main/java/com/fureniku/metropolis/utils/ShapeUtils.java index 9bc828b..10c723d 100644 --- a/src/main/java/com/fureniku/metropolis/utils/ShapeUtils.java +++ b/src/main/java/com/fureniku/metropolis/utils/ShapeUtils.java @@ -19,7 +19,9 @@ public static VoxelShape makeShape(float size, float height) { } public static VoxelShape makeShape(Vec3 shape) { - return Block.box(shape.x, 0, shape.z, 16-shape.x, shape.y, 16-shape.z); + double x = shape.x/2; + double z = shape.z/2; + return Block.box(8-x, 0, 8-z, 8+x, shape.y, 8+z); } /**