From fc8de6f046d79b332b8f70a82557d42d3998b5f9 Mon Sep 17 00:00:00 2001 From: ZekeZ Date: Mon, 11 Sep 2023 19:41:56 +1000 Subject: [PATCH 1/2] Add Quadrant --- .../VanillaIntegration.java | 6 + .../api/BlockType.java | 2 + .../blocks/QuadrantBlock.java | 74 +++++++++ .../architecture_extensions/lang/en_us.json | 1 + .../models/block/quadrant.gltf | 142 ++++++++++++++++++ .../blockstate/template_quadrant.json | 47 ++++++ .../model/block/template_quadrant.json | 44 ++++++ 7 files changed, 316 insertions(+) create mode 100644 src/main/java/io/github/debuggyteam/architecture_extensions/blocks/QuadrantBlock.java create mode 100644 src/main/resources/assets/architecture_extensions/models/block/quadrant.gltf create mode 100644 src/main/resources/assets/architecture_extensions/templates/blockstate/template_quadrant.json create mode 100644 src/main/resources/assets/architecture_extensions/templates/model/block/template_quadrant.json diff --git a/src/main/java/io/github/debuggyteam/architecture_extensions/VanillaIntegration.java b/src/main/java/io/github/debuggyteam/architecture_extensions/VanillaIntegration.java index 30cf6b6..c50fdec 100644 --- a/src/main/java/io/github/debuggyteam/architecture_extensions/VanillaIntegration.java +++ b/src/main/java/io/github/debuggyteam/architecture_extensions/VanillaIntegration.java @@ -73,6 +73,12 @@ public void integrate(Context ctx) { VanillaBlockGroups.PROCESSED_STONE, VanillaBlockGroups.BRICK, VanillaBlockGroups.TILE, VanillaBlockGroups.CRYSTAL ); + + ctx.makeArchExBlocks(BlockType.QUADRANT, + VanillaBlockGroups.WOOD, VanillaBlockGroups.STONE, VanillaBlockGroups.AQUATIC_STONE, + VanillaBlockGroups.PROCESSED_STONE, VanillaBlockGroups.BRICK, VanillaBlockGroups.TILE, + VanillaBlockGroups.CRYSTAL + ); ctx.makeArchExBlocks(BlockType.OCTAGONAL_COLUMN, VanillaBlockGroups.WOOD, VanillaBlockGroups.STONE, VanillaBlockGroups.AQUATIC_STONE, diff --git a/src/main/java/io/github/debuggyteam/architecture_extensions/api/BlockType.java b/src/main/java/io/github/debuggyteam/architecture_extensions/api/BlockType.java index baf1b05..ff1c2c0 100644 --- a/src/main/java/io/github/debuggyteam/architecture_extensions/api/BlockType.java +++ b/src/main/java/io/github/debuggyteam/architecture_extensions/api/BlockType.java @@ -3,6 +3,7 @@ import java.util.Locale; import io.github.debuggyteam.architecture_extensions.blocks.RoundArchBlock; +import io.github.debuggyteam.architecture_extensions.blocks.QuadrantBlock; import io.github.debuggyteam.architecture_extensions.blocks.FacadeBlock; import io.github.debuggyteam.architecture_extensions.blocks.IBeamBlock; import io.github.debuggyteam.architecture_extensions.blocks.LatticeBlock; @@ -57,6 +58,7 @@ public enum BlockType { TRANSOM (TransomBlock::new, 1.5f, noVariants(), SafeRenderLayer.TRANSLUCENT), OCTAGONAL_COLUMN(OctagonalColumnBlock::new, 1.5f, variantsOf("", "cap", "double_cap"), SafeRenderLayer.SOLID), ROUND_ARCH (RoundArchBlock::new, 1.5f), + QUADRANT (QuadrantBlock::new, 1.5f), ROUND_FENCE_POST(RoundFencePostBlock::new, 1.5f); private final TriFunction creator; diff --git a/src/main/java/io/github/debuggyteam/architecture_extensions/blocks/QuadrantBlock.java b/src/main/java/io/github/debuggyteam/architecture_extensions/blocks/QuadrantBlock.java new file mode 100644 index 0000000..fc44eb8 --- /dev/null +++ b/src/main/java/io/github/debuggyteam/architecture_extensions/blocks/QuadrantBlock.java @@ -0,0 +1,74 @@ +package io.github.debuggyteam.architecture_extensions.blocks; + +import io.github.debuggyteam.architecture_extensions.api.BlockType.TypedGroupedBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.HorizontalFacingBlock; +import net.minecraft.block.ShapeContext; +import net.minecraft.block.enums.BlockHalf; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.DirectionProperty; +import net.minecraft.state.property.EnumProperty; +import net.minecraft.state.property.Properties; +import net.minecraft.text.MutableText; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; +import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings; + +public class QuadrantBlock extends HorizontalFacingBlock implements TypedGrouped { + public static final DirectionProperty FACING = HorizontalFacingBlock.FACING; + public static final EnumProperty HALF = Properties.BLOCK_HALF; + + protected final TypedGroupedBlock typedGroupedBlock; + + protected static final VoxelShape SHAPE_TOP = Block.createCuboidShape(0.0, 8.0, 0.0, 16.0, 16.0, 16.0); + protected static final VoxelShape SHAPE_BOTTOM = Block.createCuboidShape(0.0, 0.0, 0.0, 16.0, 8.0, 16.0); + + public QuadrantBlock(Block baseBlock, QuiltBlockSettings settings, TypedGroupedBlock typedGroupedBlock) { + super(settings); + this.typedGroupedBlock = typedGroupedBlock; + } + + @Override + public BlockState getPlacementState(ItemPlacementContext context) { + // Thanks Falkreon + BlockHalf half = switch(context.getSide()) { + case UP -> BlockHalf.BOTTOM; + case DOWN -> BlockHalf.TOP; + default -> { + double sideHitHeight = context.getHitPos().getY() - context.getBlockPos().getY(); + if (sideHitHeight > 0.5) { + yield BlockHalf.TOP; + } else { + yield BlockHalf.BOTTOM; + } + } + }; + + return this.getDefaultState().with(FACING, context.getPlayerFacing()).with(HALF, half); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + super.appendProperties(builder); + builder.add(FACING, HALF); + } + + @Override + public VoxelShape getCullingShape(BlockState state, BlockView world, BlockPos pos) { + return VoxelShapes.empty(); + } + + @Override + public TypedGroupedBlock getTypedGroupedBlock() { + return typedGroupedBlock; + } + + @Override + public MutableText getName() { + return getServerTranslation(); + } +} diff --git a/src/main/resources/assets/architecture_extensions/lang/en_us.json b/src/main/resources/assets/architecture_extensions/lang/en_us.json index c789386..029ab37 100644 --- a/src/main/resources/assets/architecture_extensions/lang/en_us.json +++ b/src/main/resources/assets/architecture_extensions/lang/en_us.json @@ -20,6 +20,7 @@ "architecture_extensions.block_type.lattice": "Lattice", "architecture_extensions.block_type.post_cap": "Post Cap", "architecture_extensions.block_type.post_lantern": "Post Lantern", + "architecture_extensions.block_type.quadrant": "Quadrant", "architecture_extensions.block_type.rod": "Rod", "architecture_extensions.block_type.roof": "Roof", "architecture_extensions.block_type.transom": "Transom", diff --git a/src/main/resources/assets/architecture_extensions/models/block/quadrant.gltf b/src/main/resources/assets/architecture_extensions/models/block/quadrant.gltf new file mode 100644 index 0000000..fa9801a --- /dev/null +++ b/src/main/resources/assets/architecture_extensions/models/block/quadrant.gltf @@ -0,0 +1,142 @@ +{ + "asset":{ + "generator":"Khronos glTF Blender I/O v3.5.30", + "version":"2.0" + }, + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"Cylinder.001" + } + ], + "materials":[ + { + "doubleSided":true, + "name":"Material.003", + "pbrMetallicRoughness":{ + "baseColorTexture":{ + "index":0 + }, + "metallicFactor":0, + "roughnessFactor":0.4000000059604645 + } + } + ], + "meshes":[ + { + "name":"Cylinder.002", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "TEXCOORD_0":1, + "NORMAL":2 + }, + "indices":3, + "material":0 + } + ] + } + ], + "textures":[ + { + "sampler":0, + "source":0 + } + ], + "images":[ + { + "bufferView":4, + "mimeType":"image/png", + "name":"bricks" + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":48, + "max":[ + 0.4999999403953552, + 0.5000000596046448, + 0.4999998211860657 + ], + "min":[ + -0.5000002384185791, + -0.5000000596046448, + -0.5000004172325134 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":48, + "type":"VEC2" + }, + { + "bufferView":2, + "componentType":5126, + "count":48, + "type":"VEC3" + }, + { + "bufferView":3, + "componentType":5123, + "count":84, + "type":"SCALAR" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":576, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":384, + "byteOffset":576, + "target":34962 + }, + { + "buffer":0, + "byteLength":576, + "byteOffset":960, + "target":34962 + }, + { + "buffer":0, + "byteLength":168, + "byteOffset":1536, + "target":34963 + }, + { + "buffer":0, + "byteLength":301, + "byteOffset":1704 + } + ], + "samplers":[ + { + "magFilter":9728, + "minFilter":9984 + } + ], + "buffers":[ + { + "byteLength":2008, + "uri":"data:application/octet-stream;base64,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" + } + ] +} diff --git a/src/main/resources/assets/architecture_extensions/templates/blockstate/template_quadrant.json b/src/main/resources/assets/architecture_extensions/templates/blockstate/template_quadrant.json new file mode 100644 index 0000000..446949d --- /dev/null +++ b/src/main/resources/assets/architecture_extensions/templates/blockstate/template_quadrant.json @@ -0,0 +1,47 @@ +{ + "variants": { + "facing=east,half=bottom": { + "model": "{model}", + "y": 90 + }, + "facing=east,half=top": { + "model": "{model}", + "x": 180, + "y": 270, + "uvlock": true + }, + "facing=north,half=bottom": { + "model": "{model}", + "y": 0, + "uvlock": true + }, + "facing=north,half=top": { + "model": "{model}", + "x": 180, + "y": 180, + "uvlock": true + }, + "facing=south,half=bottom": { + "model": "{model}", + "y": 180, + "uvlock": true + }, + "facing=south,half=top": { + "model": "{model}", + "x": 180, + "y": 360, + "uvlock": true + }, + "facing=west,half=bottom": { + "model": "{model}", + "y": 270, + "uvlock": true + }, + "facing=west,half=top": { + "model": "{model}", + "x": 180, + "y": 90, + "uvlock": true + } + } +} diff --git a/src/main/resources/assets/architecture_extensions/templates/model/block/template_quadrant.json b/src/main/resources/assets/architecture_extensions/templates/model/block/template_quadrant.json new file mode 100644 index 0000000..96339c1 --- /dev/null +++ b/src/main/resources/assets/architecture_extensions/templates/model/block/template_quadrant.json @@ -0,0 +1,44 @@ +{ + "parent": "architecture_extensions:block/quadrant.gltf", + "loader": "suspicious_shapes:gltf", + "textures": { + "particle": "#texture", + "all": "#texture" + }, + "uvlock": true, + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 315, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 315, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "scale": [0.625, 0.625, 0.625] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} From 02ea160189ae72c4a4f724d285f0a36160749630 Mon Sep 17 00:00:00 2001 From: ZekeZ Date: Mon, 11 Sep 2023 19:53:44 +1000 Subject: [PATCH 2/2] Rename Quadrant to Curve --- .../architecture_extensions/VanillaIntegration.java | 12 ++++++------ .../architecture_extensions/api/BlockType.java | 4 ++-- .../blocks/{QuadrantBlock.java => CurveBlock.java} | 5 ++--- .../assets/architecture_extensions/lang/en_us.json | 2 +- .../models/block/{quadrant.gltf => curve.gltf} | 0 .../{template_quadrant.json => template_curve.json} | 0 .../{template_quadrant.json => template_curve.json} | 2 +- 7 files changed, 12 insertions(+), 13 deletions(-) rename src/main/java/io/github/debuggyteam/architecture_extensions/blocks/{QuadrantBlock.java => CurveBlock.java} (90%) rename src/main/resources/assets/architecture_extensions/models/block/{quadrant.gltf => curve.gltf} (100%) rename src/main/resources/assets/architecture_extensions/templates/blockstate/{template_quadrant.json => template_curve.json} (100%) rename src/main/resources/assets/architecture_extensions/templates/model/block/{template_quadrant.json => template_curve.json} (93%) diff --git a/src/main/java/io/github/debuggyteam/architecture_extensions/VanillaIntegration.java b/src/main/java/io/github/debuggyteam/architecture_extensions/VanillaIntegration.java index c50fdec..d8fdef7 100644 --- a/src/main/java/io/github/debuggyteam/architecture_extensions/VanillaIntegration.java +++ b/src/main/java/io/github/debuggyteam/architecture_extensions/VanillaIntegration.java @@ -39,6 +39,12 @@ public void integrate(Context ctx) { VanillaBlockGroups.BRICK, VanillaBlockGroups.TILE, VanillaBlockGroups.CRYSTAL ); + ctx.makeArchExBlocks(BlockType.CURVE, + VanillaBlockGroups.WOOD, VanillaBlockGroups.STONE, VanillaBlockGroups.AQUATIC_STONE, + VanillaBlockGroups.PROCESSED_STONE, VanillaBlockGroups.BRICK, VanillaBlockGroups.TILE, + VanillaBlockGroups.CRYSTAL + ); + ctx.makeArchExBlocks(BlockType.WALL_COLUMN, VanillaBlockGroups.STONE, VanillaBlockGroups.AQUATIC_STONE, VanillaBlockGroups.PROCESSED_STONE, VanillaBlockGroups.BRICK, VanillaBlockGroups.TILE, VanillaBlockGroups.CRYSTAL @@ -73,12 +79,6 @@ public void integrate(Context ctx) { VanillaBlockGroups.PROCESSED_STONE, VanillaBlockGroups.BRICK, VanillaBlockGroups.TILE, VanillaBlockGroups.CRYSTAL ); - - ctx.makeArchExBlocks(BlockType.QUADRANT, - VanillaBlockGroups.WOOD, VanillaBlockGroups.STONE, VanillaBlockGroups.AQUATIC_STONE, - VanillaBlockGroups.PROCESSED_STONE, VanillaBlockGroups.BRICK, VanillaBlockGroups.TILE, - VanillaBlockGroups.CRYSTAL - ); ctx.makeArchExBlocks(BlockType.OCTAGONAL_COLUMN, VanillaBlockGroups.WOOD, VanillaBlockGroups.STONE, VanillaBlockGroups.AQUATIC_STONE, diff --git a/src/main/java/io/github/debuggyteam/architecture_extensions/api/BlockType.java b/src/main/java/io/github/debuggyteam/architecture_extensions/api/BlockType.java index ff1c2c0..9ee496b 100644 --- a/src/main/java/io/github/debuggyteam/architecture_extensions/api/BlockType.java +++ b/src/main/java/io/github/debuggyteam/architecture_extensions/api/BlockType.java @@ -3,7 +3,7 @@ import java.util.Locale; import io.github.debuggyteam.architecture_extensions.blocks.RoundArchBlock; -import io.github.debuggyteam.architecture_extensions.blocks.QuadrantBlock; +import io.github.debuggyteam.architecture_extensions.blocks.CurveBlock; import io.github.debuggyteam.architecture_extensions.blocks.FacadeBlock; import io.github.debuggyteam.architecture_extensions.blocks.IBeamBlock; import io.github.debuggyteam.architecture_extensions.blocks.LatticeBlock; @@ -41,6 +41,7 @@ public enum BlockType { ARCH (ArchBlock::new, 2.5f, variantsOf("", "inner", "outer"), SafeRenderLayer.SOLID), BEAM (BeamBlock::new, 1.5f), + CURVE (CurveBlock::new, 1.5f), H_BEAM (BeamBlock::new, 8.0f), WALL_COLUMN (WallColumnBlock::new, 2.5f, variantsOf("", "cap"), SafeRenderLayer.SOLID), FENCE_POST (FencePostBlock::new, 1.5f), @@ -58,7 +59,6 @@ public enum BlockType { TRANSOM (TransomBlock::new, 1.5f, noVariants(), SafeRenderLayer.TRANSLUCENT), OCTAGONAL_COLUMN(OctagonalColumnBlock::new, 1.5f, variantsOf("", "cap", "double_cap"), SafeRenderLayer.SOLID), ROUND_ARCH (RoundArchBlock::new, 1.5f), - QUADRANT (QuadrantBlock::new, 1.5f), ROUND_FENCE_POST(RoundFencePostBlock::new, 1.5f); private final TriFunction creator; diff --git a/src/main/java/io/github/debuggyteam/architecture_extensions/blocks/QuadrantBlock.java b/src/main/java/io/github/debuggyteam/architecture_extensions/blocks/CurveBlock.java similarity index 90% rename from src/main/java/io/github/debuggyteam/architecture_extensions/blocks/QuadrantBlock.java rename to src/main/java/io/github/debuggyteam/architecture_extensions/blocks/CurveBlock.java index fc44eb8..899fdd7 100644 --- a/src/main/java/io/github/debuggyteam/architecture_extensions/blocks/QuadrantBlock.java +++ b/src/main/java/io/github/debuggyteam/architecture_extensions/blocks/CurveBlock.java @@ -4,7 +4,6 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.HorizontalFacingBlock; -import net.minecraft.block.ShapeContext; import net.minecraft.block.enums.BlockHalf; import net.minecraft.item.ItemPlacementContext; import net.minecraft.state.StateManager; @@ -18,7 +17,7 @@ import net.minecraft.world.BlockView; import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings; -public class QuadrantBlock extends HorizontalFacingBlock implements TypedGrouped { +public class CurveBlock extends HorizontalFacingBlock implements TypedGrouped { public static final DirectionProperty FACING = HorizontalFacingBlock.FACING; public static final EnumProperty HALF = Properties.BLOCK_HALF; @@ -27,7 +26,7 @@ public class QuadrantBlock extends HorizontalFacingBlock implements TypedGrouped protected static final VoxelShape SHAPE_TOP = Block.createCuboidShape(0.0, 8.0, 0.0, 16.0, 16.0, 16.0); protected static final VoxelShape SHAPE_BOTTOM = Block.createCuboidShape(0.0, 0.0, 0.0, 16.0, 8.0, 16.0); - public QuadrantBlock(Block baseBlock, QuiltBlockSettings settings, TypedGroupedBlock typedGroupedBlock) { + public CurveBlock(Block baseBlock, QuiltBlockSettings settings, TypedGroupedBlock typedGroupedBlock) { super(settings); this.typedGroupedBlock = typedGroupedBlock; } diff --git a/src/main/resources/assets/architecture_extensions/lang/en_us.json b/src/main/resources/assets/architecture_extensions/lang/en_us.json index 029ab37..8e68fca 100644 --- a/src/main/resources/assets/architecture_extensions/lang/en_us.json +++ b/src/main/resources/assets/architecture_extensions/lang/en_us.json @@ -11,6 +11,7 @@ "architecture_extensions.block_type.round_arch": "Arch", "architecture_extensions.block_type.beam": "Beam", "architecture_extensions.block_type.crown_molding": "Crown Molding", + "architecture_extensions.block_type.curve": "Curve", "architecture_extensions.block_type.facade": "Facade", "architecture_extensions.block_type.fence_post": "Fence Post", "architecture_extensions.block_type.round_fence_post": "Fence Post", @@ -20,7 +21,6 @@ "architecture_extensions.block_type.lattice": "Lattice", "architecture_extensions.block_type.post_cap": "Post Cap", "architecture_extensions.block_type.post_lantern": "Post Lantern", - "architecture_extensions.block_type.quadrant": "Quadrant", "architecture_extensions.block_type.rod": "Rod", "architecture_extensions.block_type.roof": "Roof", "architecture_extensions.block_type.transom": "Transom", diff --git a/src/main/resources/assets/architecture_extensions/models/block/quadrant.gltf b/src/main/resources/assets/architecture_extensions/models/block/curve.gltf similarity index 100% rename from src/main/resources/assets/architecture_extensions/models/block/quadrant.gltf rename to src/main/resources/assets/architecture_extensions/models/block/curve.gltf diff --git a/src/main/resources/assets/architecture_extensions/templates/blockstate/template_quadrant.json b/src/main/resources/assets/architecture_extensions/templates/blockstate/template_curve.json similarity index 100% rename from src/main/resources/assets/architecture_extensions/templates/blockstate/template_quadrant.json rename to src/main/resources/assets/architecture_extensions/templates/blockstate/template_curve.json diff --git a/src/main/resources/assets/architecture_extensions/templates/model/block/template_quadrant.json b/src/main/resources/assets/architecture_extensions/templates/model/block/template_curve.json similarity index 93% rename from src/main/resources/assets/architecture_extensions/templates/model/block/template_quadrant.json rename to src/main/resources/assets/architecture_extensions/templates/model/block/template_curve.json index 96339c1..286a19a 100644 --- a/src/main/resources/assets/architecture_extensions/templates/model/block/template_quadrant.json +++ b/src/main/resources/assets/architecture_extensions/templates/model/block/template_curve.json @@ -1,5 +1,5 @@ { - "parent": "architecture_extensions:block/quadrant.gltf", + "parent": "architecture_extensions:block/curve.gltf", "loader": "suspicious_shapes:gltf", "textures": { "particle": "#texture",