diff --git a/gradle.properties b/gradle.properties index 1fc391ca3..85d5b0027 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx3G -XX:+UseG1GC kotlin.code.style = official # Adorn -mod-version = 1.7.0 +mod-version = 1.7.1 local-build = false # Minecraft diff --git a/src/main/java/juuxel/adorn/mixin/BlockMixin.java b/src/main/java/juuxel/adorn/mixin/BlockMixin.java deleted file mode 100644 index fc126d94f..000000000 --- a/src/main/java/juuxel/adorn/mixin/BlockMixin.java +++ /dev/null @@ -1,27 +0,0 @@ -package juuxel.adorn.mixin; - -import juuxel.adorn.block.PicketFenceBlock; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Direction; -import net.minecraft.world.WorldView; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -@Mixin(Block.class) -public class BlockMixin { - @Inject( - method = "sideCoversSmallSquare", - at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/WorldView;getBlockState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;"), - cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD - ) - private static void onSideCoversSmallSquare(WorldView world, BlockPos pos, Direction side, CallbackInfoReturnable info, BlockState state) { - if (state.getBlock() instanceof PicketFenceBlock) { - info.setReturnValue(false); - } - } -} diff --git a/src/main/kotlin/juuxel/adorn/block/PicketFenceBlock.kt b/src/main/kotlin/juuxel/adorn/block/PicketFenceBlock.kt index d4b3b993b..d48b5215c 100644 --- a/src/main/kotlin/juuxel/adorn/block/PicketFenceBlock.kt +++ b/src/main/kotlin/juuxel/adorn/block/PicketFenceBlock.kt @@ -1,6 +1,7 @@ package juuxel.adorn.block import juuxel.adorn.util.buildShapeRotationsFromNorth +import juuxel.adorn.util.mergeIntoShapeMap import juuxel.adorn.util.mergeShapeMaps import net.minecraft.block.Block import net.minecraft.block.BlockState @@ -105,14 +106,20 @@ class PicketFenceBlock(settings: Settings) : Block(settings), Waterloggable { val WATERLOGGED: BooleanProperty = Properties.WATERLOGGED private val STRAIGHT_OUTLINE_SHAPES = buildShapeRotationsFromNorth(0, 0, 7, 16, 16, 9) - private val CORNER_OUTLINE_SHAPES = mergeShapeMaps( - buildShapeRotationsFromNorth(0, 0, 7, 9, 16, 9), - buildShapeRotationsFromNorth(7, 0, 9, 9, 16, 16) + private val CORNER_OUTLINE_SHAPES = mergeIntoShapeMap( + mergeShapeMaps( + buildShapeRotationsFromNorth(0, 0, 7, 9, 16, 9), + buildShapeRotationsFromNorth(7, 0, 9, 9, 16, 16) + ), + PlatformBlock.POST_SHAPE ) private val STRAIGHT_COLLISION_SHAPES = buildShapeRotationsFromNorth(0, 0, 7, 16, 24, 9) - private val CORNER_COLLISION_SHAPES = mergeShapeMaps( - buildShapeRotationsFromNorth(0, 0, 7, 9, 24, 9), - buildShapeRotationsFromNorth(7, 0, 9, 9, 24, 16) + private val CORNER_COLLISION_SHAPES = mergeIntoShapeMap( + mergeShapeMaps( + buildShapeRotationsFromNorth(0, 0, 7, 9, 24, 9), + buildShapeRotationsFromNorth(7, 0, 9, 9, 24, 16) + ), + createCuboidShape(6.0, 0.0, 6.0, 10.0, 24.0, 10.0) ) } diff --git a/src/main/resources/assets/adorn/models/block/picket_fence_corner.json b/src/main/resources/assets/adorn/models/block/picket_fence_corner.json index 8a80db688..4795f4671 100644 --- a/src/main/resources/assets/adorn/models/block/picket_fence_corner.json +++ b/src/main/resources/assets/adorn/models/block/picket_fence_corner.json @@ -17,30 +17,6 @@ "down": { "texture": "#tex", "cullface": "down" } } }, - { - "from": [5, 0, 7], - "to": [7, 16, 8], - "faces": { - "north": { "texture": "#tex" }, - "south": { "texture": "#tex" }, - "west": { "texture": "#tex" }, - "east": { "texture": "#tex" }, - "up": { "texture": "#tex", "cullface": "up" }, - "down": { "texture": "#tex", "cullface": "down" } - } - }, - { - "from": [8, 0, 9], - "to": [9, 16, 11], - "faces": { - "north": { "texture": "#tex" }, - "south": { "texture": "#tex" }, - "west": { "texture": "#tex" }, - "east": { "texture": "#tex" }, - "up": { "texture": "#tex", "cullface": "up" }, - "down": { "texture": "#tex", "cullface": "down" } - } - }, { "from": [8, 0, 13], "to": [9, 16, 15], @@ -55,7 +31,7 @@ }, { "from": [0, 3, 8], - "to": [8, 6, 9], + "to": [6, 6, 9], "faces": { "north": { "texture": "#tex" }, "south": { "texture": "#tex" }, @@ -67,7 +43,7 @@ }, { "from": [0, 9, 8], - "to": [8, 12, 9], + "to": [6, 12, 9], "faces": { "north": { "texture": "#tex" }, "south": { "texture": "#tex" }, @@ -78,7 +54,7 @@ } }, { - "from": [7, 3, 9], + "from": [7, 3, 10], "to": [8, 6, 16], "faces": { "north": { "texture": "#tex" }, @@ -90,7 +66,7 @@ } }, { - "from": [7, 9, 9], + "from": [7, 9, 10], "to": [8, 12, 16], "faces": { "north": { "texture": "#tex" }, @@ -100,6 +76,18 @@ "up": { "texture": "#tex" }, "down": { "texture": "#tex" } } + }, + { + "from": [6, 0, 6], + "to": [10, 16, 10], + "faces": { + "north": { "texture": "#tex" }, + "south": { "texture": "#tex" }, + "west": { "texture": "#tex" }, + "east": { "texture": "#tex" }, + "up": { "texture": "#tex", "cullface": "up" }, + "down": { "texture": "#tex", "cullface": "down" } + } } ] } diff --git a/src/main/resources/assets/adorn/textures/block/picket_fence.png b/src/main/resources/assets/adorn/textures/block/picket_fence.png index 206ab15ce..a147066c9 100644 Binary files a/src/main/resources/assets/adorn/textures/block/picket_fence.png and b/src/main/resources/assets/adorn/textures/block/picket_fence.png differ diff --git a/src/main/resources/mixins.adorn.json b/src/main/resources/mixins.adorn.json index 9e30c2c19..6250a8506 100644 --- a/src/main/resources/mixins.adorn.json +++ b/src/main/resources/mixins.adorn.json @@ -8,7 +8,6 @@ "mixins": [ "fluidloggable.FluidloggableMixin", "fluidloggable.FluidUtilMixin", - "BlockMixin", "BlockEntityMixin", "BubbleColumnBlockMixin", "EntityMixin",