From cd3a050bb455d39c4ffe2dc8642c1234d21a08c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E9=9B=A8=E8=90=BD?= Date: Thu, 27 Jun 2024 18:36:50 +0800 Subject: [PATCH] :sparkles: Add datagen. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 秋雨落 --- .../minecraft/tags/blocks/mineable/axe.json | 1 + .../datagen/ModBlockModelProvider.java | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json index 28686973..9fccaf40 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -170,6 +170,7 @@ "ultramarine:small_table", "ultramarine:small_ebony_table", "ultramarine:large_table", + "ultramarine:long_table", "ultramarine:ebony_chair", "ultramarine:chair_with_yellow_cushion", "ultramarine:painted_chair", diff --git a/src/main/java/com/voxelutopia/ultramarine/datagen/ModBlockModelProvider.java b/src/main/java/com/voxelutopia/ultramarine/datagen/ModBlockModelProvider.java index 799f0c78..f60ed366 100644 --- a/src/main/java/com/voxelutopia/ultramarine/datagen/ModBlockModelProvider.java +++ b/src/main/java/com/voxelutopia/ultramarine/datagen/ModBlockModelProvider.java @@ -377,6 +377,53 @@ else if (block instanceof SixSideBlock sixSideBlock){ simpleBlock(BlockRegistry.HEMATITE_ORE.get()); simpleBlock(BlockRegistry.DEEPSLATE_HEMATITE_ORE.get()); simpleBlock(BlockRegistry.NETHER_COBALT_ORE.get()); + + getMultipartBuilder(BlockRegistry.LONG_TABLE.get()) + .part() + .modelFile(models().getExistingFile(modLoc("block/long_table"))) + .addModel() + .condition(LongTableBlock.AXIS, Direction.Axis.X) + .condition(LongTableBlock.LEFT, false) + .condition(LongTableBlock.RIGHT, false) + .end() + .part() + .modelFile(models().getExistingFile(modLoc("block/long_table_left"))) + .addModel() + .condition(LongTableBlock.AXIS, Direction.Axis.X) + .condition(LongTableBlock.LEFT, false) + .condition(LongTableBlock.RIGHT, true) + .end() + .part() + .modelFile(models().getExistingFile(modLoc("block/long_table_right"))) + .addModel() + .condition(LongTableBlock.AXIS, Direction.Axis.X) + .condition(LongTableBlock.LEFT, true) + .condition(LongTableBlock.RIGHT, false) + .end() + .part() + .modelFile(models().getExistingFile(modLoc("block/long_table"))) + .rotationY(90) + .addModel() + .condition(LongTableBlock.AXIS, Direction.Axis.Z) + .condition(LongTableBlock.LEFT, false) + .condition(LongTableBlock.RIGHT, false) + .end() + .part() + .modelFile(models().getExistingFile(modLoc("block/long_table_left"))) + .rotationY(90) + .addModel() + .condition(LongTableBlock.AXIS, Direction.Axis.Z) + .condition(LongTableBlock.LEFT, false) + .condition(LongTableBlock.RIGHT, true) + .end() + .part() + .modelFile(models().getExistingFile(modLoc("block/long_table_right"))) + .rotationY(90) + .addModel() + .condition(LongTableBlock.AXIS, Direction.Axis.Z) + .condition(LongTableBlock.LEFT, true) + .condition(LongTableBlock.RIGHT, false) + .end(); } private ResourceLocation blockLoc(Block block){