From c64ca98a969932100d54e0da6675100e943631ae Mon Sep 17 00:00:00 2001 From: TBPig <147127248+TBPig@users.noreply.github.com> Date: Wed, 21 Jan 2026 12:40:30 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=AE=E7=A0=A7?= =?UTF-8?q?=E9=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../anvilcraft_pigsplus/lang/en_ud.json | 1 + .../anvilcraft_pigsplus/lang/en_us.json | 1 + .../models/item/auto_chicken.json | 3 + .../recipes/item_compress/auto_chicken.json | 21 ++++ .../recipe/item_compress/auto_chicken.json | 22 ++++ .../loot_table/blocks/auto_chicken.json | 21 ++++ .../tags/block/mineable/pickaxe.json | 1 + .../pigsplus/anvil/AutoChickenBehavior.java | 20 +++ .../pigsplus/block/AutoChickenBlock.java | 37 ++++++ .../pigsplus/data/recipe/RecipeHandler.java | 24 +++- .../anvilcraft/pigsplus/init/AddonBlocks.java | 12 ++ .../pigsplus/init/ModAnvilBehaviors.java | 2 + .../blockstates/auto_chicken.json | 7 ++ .../anvilcraft_pigsplus/lang/zh_cn.json | 1 + .../models/block/auto_chicken.json | 117 ++++++++++++++++++ .../textures/block/auto_chicken_core.png | Bin 0 -> 456 bytes .../textures/block/auto_chicken_pillar.png | Bin 0 -> 142 bytes .../textures/block/auto_chicken_side.png | Bin 0 -> 111 bytes 18 files changed, 288 insertions(+), 2 deletions(-) create mode 100644 src/generated/resources/assets/anvilcraft_pigsplus/models/item/auto_chicken.json create mode 100644 src/generated/resources/data/anvilcraft/advancement/recipes/item_compress/auto_chicken.json create mode 100644 src/generated/resources/data/anvilcraft/recipe/item_compress/auto_chicken.json create mode 100644 src/generated/resources/data/anvilcraft_pigsplus/loot_table/blocks/auto_chicken.json create mode 100644 src/main/java/dev/anvilcraft/pigsplus/anvil/AutoChickenBehavior.java create mode 100644 src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_chicken.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_core.png create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_pillar.png create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_side.png diff --git a/src/generated/resources/assets/anvilcraft_pigsplus/lang/en_ud.json b/src/generated/resources/assets/anvilcraft_pigsplus/lang/en_ud.json index a9c2a4c..e19693c 100644 --- a/src/generated/resources/assets/anvilcraft_pigsplus/lang/en_ud.json +++ b/src/generated/resources/assets/anvilcraft_pigsplus/lang/en_ud.json @@ -33,6 +33,7 @@ "anvilcraft_pigsplus.configuration.section.anvilcraft_pigsplus.server.toml.title": "uoıʇɐɹnbıɟuoƆ ɹǝʌɹǝS snןdsbıԀ ʇɟɐɹɔןıʌuⱯ", "anvilcraft_pigsplus.configuration.title": "uoıʇɐɹnbıɟuoƆ snןdsbıԀ ʇɟɐɹɔןıʌuⱯ", "block.anvilcraft_pigsplus.adjustable_power_converter": "ɹǝʇɹǝʌuoƆ ɹǝʍoԀ ǝןqɐʇsnظpⱯ", + "block.anvilcraft_pigsplus.auto_chicken": "uǝʞɔıɥƆ oʇnⱯ", "block.anvilcraft_pigsplus.auto_jewel_crafting_table": "ǝןqɐ⟘ buıʇɟɐɹƆ ןǝʍǝſ oʇnⱯ", "block.anvilcraft_pigsplus.auto_royal_grindstone": "ǝuoʇspuıɹ⅁ ןɐʎoᴚ oʇnⱯ", "block.anvilcraft_pigsplus.auto_royal_smithing_table": "ǝןqɐ⟘ buıɥʇıɯS ןɐʎoᴚ oʇnⱯ", diff --git a/src/generated/resources/assets/anvilcraft_pigsplus/lang/en_us.json b/src/generated/resources/assets/anvilcraft_pigsplus/lang/en_us.json index 473f037..6b0b3b7 100644 --- a/src/generated/resources/assets/anvilcraft_pigsplus/lang/en_us.json +++ b/src/generated/resources/assets/anvilcraft_pigsplus/lang/en_us.json @@ -33,6 +33,7 @@ "anvilcraft_pigsplus.configuration.section.anvilcraft_pigsplus.server.toml.title": "Anvilcraft Pigsplus Server Configuration", "anvilcraft_pigsplus.configuration.title": "Anvilcraft Pigsplus Configuration", "block.anvilcraft_pigsplus.adjustable_power_converter": "Adjustable Power Converter", + "block.anvilcraft_pigsplus.auto_chicken": "Auto Chicken", "block.anvilcraft_pigsplus.auto_jewel_crafting_table": "Auto Jewel Crafting Table", "block.anvilcraft_pigsplus.auto_royal_grindstone": "Auto Royal Grindstone", "block.anvilcraft_pigsplus.auto_royal_smithing_table": "Auto Royal Smithing Table", diff --git a/src/generated/resources/assets/anvilcraft_pigsplus/models/item/auto_chicken.json b/src/generated/resources/assets/anvilcraft_pigsplus/models/item/auto_chicken.json new file mode 100644 index 0000000..0470b12 --- /dev/null +++ b/src/generated/resources/assets/anvilcraft_pigsplus/models/item/auto_chicken.json @@ -0,0 +1,3 @@ +{ + "parent": "anvilcraft_pigsplus:block/auto_chicken" +} \ No newline at end of file diff --git a/src/generated/resources/data/anvilcraft/advancement/recipes/item_compress/auto_chicken.json b/src/generated/resources/data/anvilcraft/advancement/recipes/item_compress/auto_chicken.json new file mode 100644 index 0000000..098baca --- /dev/null +++ b/src/generated/resources/data/anvilcraft/advancement/recipes/item_compress/auto_chicken.json @@ -0,0 +1,21 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "conditions": { + "recipe": "anvilcraft:item_compress/auto_chicken" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "anvilcraft:item_compress/auto_chicken" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/anvilcraft/recipe/item_compress/auto_chicken.json b/src/generated/resources/data/anvilcraft/recipe/item_compress/auto_chicken.json new file mode 100644 index 0000000..fb45196 --- /dev/null +++ b/src/generated/resources/data/anvilcraft/recipe/item_compress/auto_chicken.json @@ -0,0 +1,22 @@ +{ + "type": "anvilcraft:item_compress", + "ingredients": [ + { + "count": 2, + "items": "anvilcraft_pigsplus:karakuri_component" + }, + { + "items": "anvilcraft:resin_block", + "predicates": { + "anvilcraft:saved_entity": { + "entitys": "minecraft:chicken" + } + } + } + ], + "results": [ + { + "id": "anvilcraft_pigsplus:auto_chicken" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/anvilcraft_pigsplus/loot_table/blocks/auto_chicken.json b/src/generated/resources/data/anvilcraft_pigsplus/loot_table/blocks/auto_chicken.json new file mode 100644 index 0000000..c65dce4 --- /dev/null +++ b/src/generated/resources/data/anvilcraft_pigsplus/loot_table/blocks/auto_chicken.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "anvilcraft_pigsplus:auto_chicken" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "anvilcraft_pigsplus:blocks/auto_chicken" +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json index c336b4b..3f52643 100644 --- a/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json @@ -1,6 +1,7 @@ { "values": [ "anvilcraft_pigsplus:cauldron_output", + "anvilcraft_pigsplus:auto_chicken", "anvilcraft_pigsplus:redstone_conduit_block", "anvilcraft_pigsplus:block_breaker", "anvilcraft_pigsplus:chain_smithing_table", diff --git a/src/main/java/dev/anvilcraft/pigsplus/anvil/AutoChickenBehavior.java b/src/main/java/dev/anvilcraft/pigsplus/anvil/AutoChickenBehavior.java new file mode 100644 index 0000000..4260b51 --- /dev/null +++ b/src/main/java/dev/anvilcraft/pigsplus/anvil/AutoChickenBehavior.java @@ -0,0 +1,20 @@ +package dev.anvilcraft.pigsplus.anvil; + +import dev.anvilcraft.pigsplus.block.AutoChickenBlock; +import dev.dubhe.anvilcraft.api.anvil.IAnvilBehavior; +import dev.dubhe.anvilcraft.api.event.AnvilEvent; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +public class AutoChickenBehavior implements IAnvilBehavior { + @Override + public boolean handle(Level level, BlockPos hitBlockPos, BlockState hitBlockState, float fallDistance, AnvilEvent.OnLand event) { + if (!(level instanceof ServerLevel serverLevel)) return false; + + AutoChickenBlock block = (AutoChickenBlock) hitBlockState.getBlock(); + block.spawnEgg(serverLevel, hitBlockPos); + return true; + } +} diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java b/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java new file mode 100644 index 0000000..f1cf923 --- /dev/null +++ b/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java @@ -0,0 +1,37 @@ +package dev.anvilcraft.pigsplus.block; + +import dev.dubhe.anvilcraft.api.hammer.IHammerRemovable; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +public class AutoChickenBlock extends Block implements IHammerRemovable { + public AutoChickenBlock(Properties properties) { + super(properties); + } + + public void spawnEgg(ServerLevel level, BlockPos pos) { + BlockState breakerBlockState = level.getBlockState(pos); + if (breakerBlockState.isAir()) return; + // 在方块下方生成一个鸡蛋掉落物 + ItemStack itemStack = new ItemStack(Items.EGG); + Vec3 itemPos = pos.below().getCenter(); + level.addFreshEntity( + new ItemEntity( + level, + itemPos.x, + itemPos.y, + itemPos.z, + itemStack, + level.random.nextDouble() * 0.2 - 0.1, + -0.1, + level.random.nextDouble() * 0.2 - 0.1 + ) + ); + } +} diff --git a/src/main/java/dev/anvilcraft/pigsplus/data/recipe/RecipeHandler.java b/src/main/java/dev/anvilcraft/pigsplus/data/recipe/RecipeHandler.java index 0938aac..01178fe 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/data/recipe/RecipeHandler.java +++ b/src/main/java/dev/anvilcraft/pigsplus/data/recipe/RecipeHandler.java @@ -1,11 +1,17 @@ package dev.anvilcraft.pigsplus.data.recipe; import com.tterrag.registrate.providers.RegistrateRecipeProvider; +import dev.anvilcraft.lib.recipe.component.ItemIngredientPredicate; import dev.anvilcraft.pigsplus.init.AddonBlocks; import dev.anvilcraft.pigsplus.init.AddonItems; +import dev.dubhe.anvilcraft.init.block.ModBlocks; +import dev.dubhe.anvilcraft.init.item.ModItemSubPredicates; +import dev.dubhe.anvilcraft.item.property.predicate.ItemSavedEntityPredicate; +import dev.dubhe.anvilcraft.recipe.anvil.wrap.ItemCompressRecipe; import dev.dubhe.anvilcraft.recipe.anvil.wrap.ItemInjectRecipe; import dev.dubhe.anvilcraft.recipe.anvil.wrap.TimeWarpRecipe; import dev.dubhe.anvilcraft.recipe.mineral.MineralFountainRecipe; +import net.minecraft.world.entity.EntityType; import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Blocks; @@ -29,9 +35,23 @@ public static void init(RegistrateRecipeProvider provider) { .save(provider); TimeWarpRecipe.builder() - .requires(Items.ENDER_PEARL,6) - .requires(Items.END_STONE,18) + .requires(Items.ENDER_PEARL, 6) + .requires(Items.END_STONE, 18) .result(AddonItems.ENDER_COMPONENT) .save(provider); + + ItemCompressRecipe.builder() + .requires(AddonItems.KARAKURI_COMPONENT, 2) + .requires( + ItemIngredientPredicate + .of(ModBlocks.RESIN_BLOCK.asItem()) + .withSubPredicate( + ModItemSubPredicates.SAVED_ENTITY.get(), + ItemSavedEntityPredicate.of(EntityType.CHICKEN) + ) + .build() + ) + .result(AddonBlocks.AUTO_CHICKEN) + .save(provider); } } diff --git a/src/main/java/dev/anvilcraft/pigsplus/init/AddonBlocks.java b/src/main/java/dev/anvilcraft/pigsplus/init/AddonBlocks.java index b4446c6..aef11a3 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/init/AddonBlocks.java +++ b/src/main/java/dev/anvilcraft/pigsplus/init/AddonBlocks.java @@ -2,6 +2,7 @@ import com.tterrag.registrate.util.entry.BlockEntry; import dev.anvilcraft.pigsplus.block.AdjustablePowerConverterBlock; +import dev.anvilcraft.pigsplus.block.AutoChickenBlock; import dev.anvilcraft.pigsplus.block.AutoJewelCraftingTableBlock; import dev.anvilcraft.pigsplus.block.AutoRoyalGrindstoneBlock; import dev.anvilcraft.pigsplus.block.AutoRoyalSmithingTableBlock; @@ -35,6 +36,7 @@ import static dev.anvilcraft.pigsplus.AnvilCraftPigsPlus.REGISTRATE; +@SuppressWarnings("unused") public class AddonBlocks { static { REGISTRATE.defaultCreativeTab(AddonItemGroups.ADDON_ITEMS.getKey()); @@ -77,6 +79,16 @@ public class AddonBlocks { ) .register(); + public static final BlockEntry AUTO_CHICKEN = REGISTRATE + .block("auto_chicken", AutoChickenBlock::new) + .lang("Auto Chicken") + .initialProperties(() -> Blocks.IRON_BLOCK) + .properties(BlockBehaviour.Properties::noOcclusion) + .blockstate(DataGenUtil::noExtraModelOrState) + .simpleItem() + .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .register(); + public static final BlockEntry REDSTONE_CONDUIT_BLOCK = REGISTRATE .block("redstone_conduit_block", RedstoneConduitBlock::new) .lang("Redstone Conduit Block") diff --git a/src/main/java/dev/anvilcraft/pigsplus/init/ModAnvilBehaviors.java b/src/main/java/dev/anvilcraft/pigsplus/init/ModAnvilBehaviors.java index 5ef992c..0a0a0a3 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/init/ModAnvilBehaviors.java +++ b/src/main/java/dev/anvilcraft/pigsplus/init/ModAnvilBehaviors.java @@ -1,6 +1,7 @@ package dev.anvilcraft.pigsplus.init; import dev.anvilcraft.pigsplus.AnvilCraftPigsPlus; +import dev.anvilcraft.pigsplus.anvil.AutoChickenBehavior; import dev.anvilcraft.pigsplus.anvil.BlockBreakerBehavior; import dev.dubhe.anvilcraft.api.event.AnvilBehaviorRegisterEvent; import net.neoforged.bus.api.SubscribeEvent; @@ -11,5 +12,6 @@ public class ModAnvilBehaviors { @SubscribeEvent public static void register(AnvilBehaviorRegisterEvent event) { event.registerBehavior(AddonBlocks.BLOCK_BREAKER.get(), new BlockBreakerBehavior()); + event.registerBehavior(AddonBlocks.AUTO_CHICKEN.get(), new AutoChickenBehavior()); } } diff --git a/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_chicken.json b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_chicken.json new file mode 100644 index 0000000..fd89182 --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_chicken.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "anvilcraft_pigsplus:block/auto_chicken" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/lang/zh_cn.json b/src/main/resources/assets/anvilcraft_pigsplus/lang/zh_cn.json index 19ff778..9423535 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/lang/zh_cn.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/lang/zh_cn.json @@ -33,6 +33,7 @@ "anvilcraft_pigsplus.configuration.section.anvilcraft_pigsplus.server.toml.title": "铁砧工艺:猪+ 服务端配置", "anvilcraft_pigsplus.configuration.title": "铁砧工艺:猪+ 配置", "block.anvilcraft_pigsplus.adjustable_power_converter": "可调式能量转换器", + "block.anvilcraft_pigsplus.auto_chicken": "叮砧鸡", "block.anvilcraft_pigsplus.auto_jewel_crafting_table": "自动珠宝加工台", "block.anvilcraft_pigsplus.auto_royal_grindstone": "自动皇家砂轮", "block.anvilcraft_pigsplus.auto_royal_smithing_table": "自动皇家锻造台", diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json new file mode 100644 index 0000000..5ec88ec --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json @@ -0,0 +1,117 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench by TBpig", + "parent": "minecraft:block/cube", + "render_type": "minecraft:translucent", + "texture_size": [32, 32], + "textures": { + "0": "anvilcraft_pigsplus:block/auto_chicken_side", + "1": "anvilcraft_pigsplus:block/auto_chicken_pillar", + "2": "anvilcraft_pigsplus:block/auto_chicken_core", + "particle": "anvilcraft_pigsplus:block/auto_chicken_side" + }, + "elements": [ + { + "from": [0, 14, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 14, 0]}, + "faces": { + "north": {"uv": [0, 14, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 14, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 14, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 14, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [2, 2, 2], + "to": [14, 14, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 2, 2]}, + "faces": { + "north": {"uv": [0, 0, 12, 12], "texture": "#1"}, + "east": {"uv": [0, 0, 12, 12], "texture": "#1"}, + "south": {"uv": [0, 0, 12, 12], "texture": "#1"}, + "west": {"uv": [0, 0, 12, 12], "texture": "#1"}, + "up": {"uv": [0, 0, 12, 12], "texture": "#1"}, + "down": {"uv": [0, 0, 12, 12], "texture": "#1"} + } + }, + { + "from": [0, 0, 0], + "to": [16, 2, 16], + "faces": { + "north": {"uv": [0, 14, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 14, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 14, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 14, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [6, 7, 8], + "to": [10, 11, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 9, 10]}, + "faces": { + "north": {"uv": [2.5, 5, 4.5, 7], "texture": "#2"}, + "east": {"uv": [4.5, 5, 6.5, 7], "texture": "#2"}, + "south": {"uv": [6, 2, 8, 4], "texture": "#2"}, + "west": {"uv": [6.5, 4, 8.5, 6], "texture": "#2"}, + "up": {"uv": [8.5, 8, 6.5, 6], "texture": "#2"}, + "down": {"uv": [2, 7, 0, 9], "texture": "#2"} + } + }, + { + "from": [5.5, 5, 4], + "to": [10.5, 9, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 5, 4]}, + "faces": { + "north": {"uv": [0, 5, 2.5, 7], "texture": "#2"}, + "east": {"uv": [0, 3, 3, 5], "texture": "#2"}, + "south": {"uv": [5, 0, 7.5, 2], "texture": "#2"}, + "west": {"uv": [3, 3, 6, 5], "texture": "#2"}, + "up": {"uv": [2.5, 3, 0, 0], "texture": "#2"}, + "down": {"uv": [5, 0, 2.5, 3], "texture": "#2"} + } + }, + { + "from": [6, 2.03, 7], + "to": [10, 5.01, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 2, 7]}, + "faces": { + "north": {"uv": [2, 7, 4, 8.5], "texture": "#2"}, + "east": {"uv": [6, 7, 6.5, 8.5], "texture": "#2"}, + "south": {"uv": [4, 7, 6, 8.5], "texture": "#2"}, + "west": {"uv": [8, 1, 8.5, 2.5], "texture": "#2"}, + "up": {"uv": [9.5, 0.5, 7.5, 0], "texture": "#2"}, + "down": {"uv": [9.5, 0.5, 7.5, 1], "texture": "#2"} + } + }, + { + "from": [10, 2.03, 7], + "to": [6, 5.01, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 2, 7]}, + "faces": { + "north": {"uv": [2, 7, 4, 8.5], "texture": "#2"}, + "east": {"uv": [6, 7, 6.5, 8.5], "texture": "#2"}, + "south": {"uv": [4, 7, 6, 8.5], "texture": "#2"}, + "west": {"uv": [8, 1, 8.5, 2.5], "texture": "#2"}, + "up": {"uv": [9.5, 0.5, 7.5, 0], "texture": "#2"}, + "down": {"uv": [9.5, 0.5, 7.5, 1], "texture": "#2"} + } + } + ], + "display": {}, + "groups": [ + 0, + 1, + 2, + { + "name": "core", + "origin": [8, 8, 8], + "color": 0, + "children": [3, 4, 5, 6] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_core.png b/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_core.png new file mode 100644 index 0000000000000000000000000000000000000000..e0778caa3dd38908d608b5717faf54eea65e54ec GIT binary patch literal 456 zcmV;(0XP1MP);yJJWbk{CTZGU?xkCPa7pfecjW()cS*dv;4LBwSCunWBGu#H0c~dGG)0hjwAfr- z;6m-`oz>Zl&$UJ~Wc74*ook)O1NnN)MYC&lW6|AFNI<=On%L zQs*7pB6bb{G~%D@IRe*rxs1w#ZVvP!R)L6h!03#6Czb&}C~6-RH~Q@`f6m*5{r{X9 zk{^i-&|=9?bKx~?5mAGC$P*YXY~+#wQ|`C-WT8|dNnr*cN)c64^91$}-5O$Kpj|zY zgo~paGH!!82zJmbAU8k@*!f1Sek$0=B?G2xgo$@B4%C6f8E^)i y0cXG&a0YDf2LJ&7{{XEA9{>OV21!IgR09CaG=_5xPH5Kv0000xoXVdscGH|MSukJnu1`%FPBN)MDLI6P9nGgY4B3%fi6 l!~g%9oUA~afemCFGs9^Wws)3IEo*=x44$rjF6*2UngBBHC~p7& literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_side.png b/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_side.png new file mode 100644 index 0000000000000000000000000000000000000000..2d6e9600d139fde67358c733295b0bfcd6fade53 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|DxNNmAr*7poHpcTVBldg;4AU@ zcjqA^?;Mpc`d`~w1fwEeaI!Hl{QrNA=} Date: Sun, 1 Feb 2026 15:32:17 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=AE=E7=A0=A7?= =?UTF-8?q?=E9=B8=A1=E7=9A=84=E6=A8=A1=E5=9E=8B=E5=92=8C=E7=A2=B0=E6=92=9E?= =?UTF-8?q?=E7=AE=B1;=E9=AB=98=E5=BA=A6=E8=B6=8A=E9=AB=98=EF=BC=8C?= =?UTF-8?q?=E7=94=9F=E8=9B=8B=E6=A6=82=E7=8E=87=E8=B6=8A=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pigsplus/anvil/AutoChickenBehavior.java | 2 +- .../pigsplus/block/AutoChickenBlock.java | 40 ++++++++- .../anvilcraft_guideme/auto_chicken.md | 27 ++++++ .../models/block/auto_chicken.json | 80 ++++++++++-------- .../textures/block/auto_chicken_core.png | Bin 456 -> 234 bytes 5 files changed, 110 insertions(+), 39 deletions(-) create mode 100644 src/main/resources/assets/anvilcraft_guideme/anvilcraft_guideme/auto_chicken.md diff --git a/src/main/java/dev/anvilcraft/pigsplus/anvil/AutoChickenBehavior.java b/src/main/java/dev/anvilcraft/pigsplus/anvil/AutoChickenBehavior.java index 4260b51..c24c65a 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/anvil/AutoChickenBehavior.java +++ b/src/main/java/dev/anvilcraft/pigsplus/anvil/AutoChickenBehavior.java @@ -14,7 +14,7 @@ public boolean handle(Level level, BlockPos hitBlockPos, BlockState hitBlockStat if (!(level instanceof ServerLevel serverLevel)) return false; AutoChickenBlock block = (AutoChickenBlock) hitBlockState.getBlock(); - block.spawnEgg(serverLevel, hitBlockPos); + block.spawnEgg(serverLevel, hitBlockPos, fallDistance); return true; } } diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java b/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java index f1cf923..584d59e 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java @@ -3,21 +3,57 @@ import dev.dubhe.anvilcraft.api.hammer.IHammerRemovable; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; public class AutoChickenBlock extends Block implements IHammerRemovable { + + public static VoxelShape SHAPE = Shapes.or( + Block.box(0, 14, 0, 16, 16, 16), + Block.box(2, 2, 2, 14, 14, 14), + Block.box(0, 0, 0, 16, 2, 16) + ); + public AutoChickenBlock(Properties properties) { super(properties); } - public void spawnEgg(ServerLevel level, BlockPos pos) { + @Override + public RenderShape getRenderShape(BlockState state) { + return RenderShape.MODEL; + } + + @Override + public VoxelShape getShape( + BlockState state, + BlockGetter level, + BlockPos pos, + CollisionContext context + ) { + return SHAPE; + } + + public void spawnEgg(ServerLevel level, BlockPos pos, float fallDistance) { BlockState breakerBlockState = level.getBlockState(pos); if (breakerBlockState.isAir()) return; + RandomSource randomSource = level.getRandom(); + float f = randomSource.nextFloat(); + if (fallDistance <= 1.25f) { + fallDistance = 1.25f; + } + if (f <= (1 / fallDistance)) { + return; + } // 在方块下方生成一个鸡蛋掉落物 ItemStack itemStack = new ItemStack(Items.EGG); Vec3 itemPos = pos.below().getCenter(); @@ -29,7 +65,7 @@ public void spawnEgg(ServerLevel level, BlockPos pos) { itemPos.z, itemStack, level.random.nextDouble() * 0.2 - 0.1, - -0.1, + -0.5, level.random.nextDouble() * 0.2 - 0.1 ) ); diff --git a/src/main/resources/assets/anvilcraft_guideme/anvilcraft_guideme/auto_chicken.md b/src/main/resources/assets/anvilcraft_guideme/anvilcraft_guideme/auto_chicken.md new file mode 100644 index 0000000..ae6050b --- /dev/null +++ b/src/main/resources/assets/anvilcraft_guideme/anvilcraft_guideme/auto_chicken.md @@ -0,0 +1,27 @@ +--- +navigation: + title: "§a叮砧鸡" + icon: "anvilcraft_pigsplus:auto_chicken" + position: 102 + parent: anvilcraft_guideme:pigsplus.md +item_ids: + - anvilcraft_pigsplus:auto_chicken +--- + +# 叮砧鸡 + + + + + +# 合成 + + + + +树脂块内,需抓有一只鸡 + +# 特性 + +- 被铁砧砸击时,下方概率生出一个蛋 +- 铁砧高度越高,概率越高 p = 1 - 1/h (最低20%) \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json index 5ec88ec..8290554 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json @@ -50,59 +50,58 @@ } }, { - "from": [6, 7, 8], - "to": [10, 11, 12], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 9, 10]}, + "from": [6, 8, 9], + "to": [10, 13, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 11]}, "faces": { - "north": {"uv": [2.5, 5, 4.5, 7], "texture": "#2"}, - "east": {"uv": [4.5, 5, 6.5, 7], "texture": "#2"}, - "south": {"uv": [6, 2, 8, 4], "texture": "#2"}, - "west": {"uv": [6.5, 4, 8.5, 6], "texture": "#2"}, - "up": {"uv": [8.5, 8, 6.5, 6], "texture": "#2"}, - "down": {"uv": [2, 7, 0, 9], "texture": "#2"} + "north": {"uv": [5.5, 2.5, 7.5, 5], "texture": "#2"}, + "east": {"uv": [2.5, 6, 4, 8.5], "texture": "#2"}, + "south": {"uv": [5.5, 5, 7.5, 7.5], "texture": "#2"}, + "west": {"uv": [4, 6, 5.5, 8.5], "texture": "#2"}, + "up": {"uv": [2, 9, 0, 7.5], "texture": "#2"}, + "down": {"uv": [9.5, 2.5, 7.5, 4], "texture": "#2"} } }, { "from": [5.5, 5, 4], - "to": [10.5, 9, 10], - "rotation": {"angle": 0, "axis": "y", "origin": [5, 5, 4]}, + "to": [10.5, 10, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, "faces": { - "north": {"uv": [0, 5, 2.5, 7], "texture": "#2"}, - "east": {"uv": [0, 3, 3, 5], "texture": "#2"}, - "south": {"uv": [5, 0, 7.5, 2], "texture": "#2"}, - "west": {"uv": [3, 3, 6, 5], "texture": "#2"}, - "up": {"uv": [2.5, 3, 0, 0], "texture": "#2"}, - "down": {"uv": [5, 0, 2.5, 3], "texture": "#2"} + "north": {"uv": [0, 5, 2.5, 7.5], "texture": "#2"}, + "east": {"uv": [0, 0, 3, 2.5], "texture": "#2"}, + "south": {"uv": [5.5, 0, 8, 2.5], "texture": "#2"}, + "west": {"uv": [0, 2.5, 3, 5], "texture": "#2"}, + "up": {"uv": [5.5, 3, 3, 0], "texture": "#2"}, + "down": {"uv": [5.5, 3, 3, 6], "texture": "#2"} } }, { - "from": [6, 2.03, 7], - "to": [10, 5.01, 8], + "from": [6, 2, 7], + "to": [7, 5, 7], "rotation": {"angle": 0, "axis": "y", "origin": [6, 2, 7]}, "faces": { - "north": {"uv": [2, 7, 4, 8.5], "texture": "#2"}, - "east": {"uv": [6, 7, 6.5, 8.5], "texture": "#2"}, - "south": {"uv": [4, 7, 6, 8.5], "texture": "#2"}, - "west": {"uv": [8, 1, 8.5, 2.5], "texture": "#2"}, - "up": {"uv": [9.5, 0.5, 7.5, 0], "texture": "#2"}, - "down": {"uv": [9.5, 0.5, 7.5, 1], "texture": "#2"} + "north": {"uv": [2, 7.5, 2.5, 9], "texture": "#2"}, + "east": {"uv": [0, 0, 0, 1.5], "texture": "#2"}, + "south": {"uv": [7.5, 4, 8, 5.5], "texture": "#2"}, + "west": {"uv": [0, 0, 0, 1.5], "texture": "#2"}, + "up": {"uv": [0.5, 0, 0, 0], "texture": "#2"}, + "down": {"uv": [0.5, 0, 0, 0], "texture": "#2"} } }, { - "from": [10, 2.03, 7], - "to": [6, 5.01, 8], - "rotation": {"angle": 0, "axis": "y", "origin": [10, 2, 7]}, + "from": [9, 2, 7], + "to": [10, 5, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 2, 7]}, "faces": { - "north": {"uv": [2, 7, 4, 8.5], "texture": "#2"}, - "east": {"uv": [6, 7, 6.5, 8.5], "texture": "#2"}, - "south": {"uv": [4, 7, 6, 8.5], "texture": "#2"}, - "west": {"uv": [8, 1, 8.5, 2.5], "texture": "#2"}, - "up": {"uv": [9.5, 0.5, 7.5, 0], "texture": "#2"}, - "down": {"uv": [9.5, 0.5, 7.5, 1], "texture": "#2"} + "north": {"uv": [5.5, 7.5, 6, 9], "texture": "#2"}, + "east": {"uv": [0, 0, 0, 1.5], "texture": "#2"}, + "south": {"uv": [7.5, 5.5, 8, 7], "texture": "#2"}, + "west": {"uv": [0, 0, 0, 1.5], "texture": "#2"}, + "up": {"uv": [0.5, 0, 0, 0], "texture": "#2"}, + "down": {"uv": [0.5, 0, 0, 0], "texture": "#2"} } } ], - "display": {}, "groups": [ 0, 1, @@ -111,7 +110,16 @@ "name": "core", "origin": [8, 8, 8], "color": 0, - "children": [3, 4, 5, 6] + "children": [ + 3, + 4, + { + "name": "foot", + "origin": [8, 8, 8], + "color": 0, + "children": [5, 6] + } + ] } ] } \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_core.png b/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_core.png index e0778caa3dd38908d608b5717faf54eea65e54ec..a2b7d49c128ed259c2ecd486804e2d6e5d4a3cfb 100644 GIT binary patch delta 207 zcmX@X{EBgcay`R*PZ!6KiaBql`tms#2)MD|jT8{ypj^nAUd}0GEk415QCCs)?V`Dt zyq>-NwYg$u-Q`4Wb^#X|hXV(URX)@+S{^ZLT%z8=c+kkK`lkPZCIjt;zjrS%S*7TQ z_jxhit(mZWqVkhN8qCG<_pWhzGkT|3@jm}HL1WiR&oDWrMO!^KtqPA5ORu!G;LX^P zyMih1!RET_j)yx~JQ_e~4|fg&1H=FSmkl^Ffebc~TbUX3HmlccdRP+y6k+gm^>bP0 Hl+XkKZuC$c delta 431 zcmV;g0Z{(x0muW8BYy#XNkl;yJJWbk{CTZGU?xkCPa7pfecjW()cS*dv z;4LBwSCunWBGu#H0c~dGG)0hjwAfr-;6m-`oz>Zl&$UJ~WPkN^cAaaT#sm3!%tfp23~ce#wpgKiG=B36Nj zb-?J1dMB0vKYu7{9~3wG?J$4N+lBrAoEefIi44$U$xn0PHEa=4gL}vm7%gn%k^xih zxA$bBR3b@X1|UiiRa5f>_7B|}Vq~CQJ&}ZqqZ=}AgE Date: Sun, 1 Feb 2026 16:22:20 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=90=88=E5=B9=B6AutoMachineBlock=E7=9A=84?= =?UTF-8?q?=E5=85=AC=E5=85=B1=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../block/AutoJewelCraftingTableBlock.java | 103 +--------------- .../pigsplus/block/AutoMachineBlock.java | 113 ++++++++++++++++++ .../block/AutoRoyalGrindstoneBlock.java | 103 +--------------- .../block/AutoRoyalSmithingTableBlock.java | 103 +--------------- 4 files changed, 116 insertions(+), 306 deletions(-) create mode 100644 src/main/java/dev/anvilcraft/pigsplus/block/AutoMachineBlock.java diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/AutoJewelCraftingTableBlock.java b/src/main/java/dev/anvilcraft/pigsplus/block/AutoJewelCraftingTableBlock.java index d28b45b..6ac27bc 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/AutoJewelCraftingTableBlock.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/AutoJewelCraftingTableBlock.java @@ -4,47 +4,27 @@ import dev.anvilcraft.pigsplus.block.entity.AutoJewelCraftingTableBlockEntity; import dev.anvilcraft.pigsplus.init.AddonBlockEntities; import dev.anvilcraft.pigsplus.init.AddonMenuTypes; -import dev.dubhe.anvilcraft.api.hammer.IHammerRemovable; -import dev.dubhe.anvilcraft.api.power.IPowerComponent; -import dev.dubhe.anvilcraft.block.better.BetterBaseEntityBlock; import dev.dubhe.anvilcraft.network.MachineOutputDirectionPacket; import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.util.RandomSource; -import net.minecraft.world.Containers; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.GameType; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseEntityBlock; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.Vec3; -import net.neoforged.neoforge.items.IItemHandler; import net.neoforged.neoforge.network.PacketDistributor; import org.jetbrains.annotations.Nullable; -public class AutoJewelCraftingTableBlock extends BetterBaseEntityBlock implements IHammerRemovable { - public static final BooleanProperty POWERED = BlockStateProperties.POWERED; - public static final BooleanProperty OVERLOAD = IPowerComponent.OVERLOAD; +public class AutoJewelCraftingTableBlock extends AutoMachineBlock { public AutoJewelCraftingTableBlock(Properties properties) { super(properties); - this.registerDefaultState(this.stateDefinition - .any() - .setValue(POWERED, false) - .setValue(OVERLOAD, true)); } @Override @@ -52,26 +32,6 @@ protected MapCodec codec() { return simpleCodec(AutoJewelCraftingTableBlock::new); } - @Override - public boolean hasAnalogOutputSignal(BlockState blockState) { - return true; - } - - @Override - public int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) { - BlockEntity blockEntity = level.getBlockEntity(blockPos); - if (blockEntity instanceof AutoJewelCraftingTableBlockEntity autoJewelCraftingTableBlockEntity) { - return autoJewelCraftingTableBlockEntity.getRedstoneSignal(); - } - return 0; - } - - @Override - public RenderShape getRenderShape(BlockState state) { - return RenderShape.MODEL; - } - - @Nullable @Override public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return new AutoJewelCraftingTableBlockEntity(AddonBlockEntities.AUTO_JEWEL_CRAFTING_TABLE.get(), pos, state); @@ -99,67 +59,6 @@ public InteractionResult use( return InteractionResult.SUCCESS; } - - @Override - public void onRemove( - BlockState state, - Level level, - BlockPos pos, - BlockState newState, - boolean movedByPiston - ) { - if (state.is(newState.getBlock())) return; - if (level.getBlockEntity(pos) instanceof AutoJewelCraftingTableBlockEntity entity) { - Vec3 vec3 = entity.getBlockPos().getCenter(); - IItemHandler itemHandler = entity.getItemHandler(); - for (int slot = 0; slot < itemHandler.getSlots(); slot++) { - Containers.dropItemStack(level, vec3.x, vec3.y, vec3.z, itemHandler.getStackInSlot(slot)); - } - level.updateNeighbourForOutputSignal(pos, this); - } - super.onRemove(state, level, pos, newState, movedByPiston); - } - - - @Nullable - public BlockState getStateForPlacement(BlockPlaceContext context) { - return this.defaultBlockState() - .setValue(POWERED, context.getLevel().hasNeighborSignal(context.getClickedPos())) - .setValue(OVERLOAD, true); - } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(POWERED).add(OVERLOAD); - } - - @Override - public void neighborChanged( - BlockState state, - Level level, - BlockPos pos, - Block neighborBlock, - BlockPos neighborPos, - boolean movedByPiston - ) { - if (level.isClientSide) { - return; - } - level.setBlock(pos, state.setValue(POWERED, level.hasNeighborSignal(pos)), 2); - } - - @Override - public void tick( - BlockState state, - ServerLevel level, - BlockPos pos, - RandomSource random - ) { - if (state.getValue(POWERED) && !level.hasNeighborSignal(pos)) { - level.setBlock(pos, state.cycle(POWERED), 2); - } - } - @Override public @Nullable BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType type) { if (level.isClientSide) { diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/AutoMachineBlock.java b/src/main/java/dev/anvilcraft/pigsplus/block/AutoMachineBlock.java new file mode 100644 index 0000000..41f3691 --- /dev/null +++ b/src/main/java/dev/anvilcraft/pigsplus/block/AutoMachineBlock.java @@ -0,0 +1,113 @@ +package dev.anvilcraft.pigsplus.block; + +import dev.anvilcraft.pigsplus.block.entity.AutoMachineBlockEntity; +import dev.dubhe.anvilcraft.api.hammer.IHammerRemovable; +import dev.dubhe.anvilcraft.api.power.IPowerComponent; +import dev.dubhe.anvilcraft.block.better.BetterBaseEntityBlock; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.Containers; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.phys.Vec3; +import net.neoforged.neoforge.items.IItemHandler; +import org.jetbrains.annotations.Nullable; + +public abstract class AutoMachineBlock extends BetterBaseEntityBlock implements IHammerRemovable { + public static final BooleanProperty POWERED = BlockStateProperties.POWERED; + public static final BooleanProperty OVERLOAD = IPowerComponent.OVERLOAD; + + protected AutoMachineBlock(Properties properties) { + super(properties); + this.registerDefaultState(this.stateDefinition + .any() + .setValue(POWERED, false) + .setValue(OVERLOAD, true)); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(POWERED).add(OVERLOAD); + } + + @Nullable + public BlockState getStateForPlacement(BlockPlaceContext context) { + return this.defaultBlockState() + .setValue(POWERED, context.getLevel().hasNeighborSignal(context.getClickedPos())) + .setValue(OVERLOAD, true); + } + + @Override + public RenderShape getRenderShape(BlockState state) { + return RenderShape.MODEL; + } + + @Override + public boolean hasAnalogOutputSignal(BlockState blockState) { + return true; + } + + @Override + public int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) { + BlockEntity blockEntity = level.getBlockEntity(blockPos); + if (blockEntity instanceof AutoMachineBlockEntity autoMachineBlockEntity) { + return autoMachineBlockEntity.getRedstoneSignal(); + } + return 0; + } + + @Override + public void neighborChanged( + BlockState state, + Level level, + BlockPos pos, + Block neighborBlock, + BlockPos neighborPos, + boolean movedByPiston + ) { + if (level.isClientSide) { + return; + } + level.setBlock(pos, state.setValue(POWERED, level.hasNeighborSignal(pos)), 2); + } + + @Override + public void tick( + BlockState state, + ServerLevel level, + BlockPos pos, + RandomSource random + ) { + if (state.getValue(POWERED) && !level.hasNeighborSignal(pos)) { + level.setBlock(pos, state.cycle(POWERED), 2); + } + } + + @Override + public void onRemove( + BlockState state, + Level level, + BlockPos pos, + BlockState newState, + boolean movedByPiston + ) { + if (state.is(newState.getBlock())) return; + if (level.getBlockEntity(pos) instanceof AutoMachineBlockEntity entity) { + Vec3 vec3 = entity.getBlockPos().getCenter(); + IItemHandler itemHandler = entity.getItemHandler(); + for (int slot = 0; slot < itemHandler.getSlots(); slot++) { + Containers.dropItemStack(level, vec3.x, vec3.y, vec3.z, itemHandler.getStackInSlot(slot)); + } + level.updateNeighbourForOutputSignal(pos, this); + } + super.onRemove(state, level, pos, newState, movedByPiston); + } +} \ No newline at end of file diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/AutoRoyalGrindstoneBlock.java b/src/main/java/dev/anvilcraft/pigsplus/block/AutoRoyalGrindstoneBlock.java index e2faca2..fed185d 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/AutoRoyalGrindstoneBlock.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/AutoRoyalGrindstoneBlock.java @@ -4,47 +4,27 @@ import dev.anvilcraft.pigsplus.block.entity.AutoRoyalGrindstoneBlockEntity; import dev.anvilcraft.pigsplus.init.AddonBlockEntities; import dev.anvilcraft.pigsplus.init.AddonMenuTypes; -import dev.dubhe.anvilcraft.api.hammer.IHammerRemovable; -import dev.dubhe.anvilcraft.api.power.IPowerComponent; -import dev.dubhe.anvilcraft.block.better.BetterBaseEntityBlock; import dev.dubhe.anvilcraft.network.MachineOutputDirectionPacket; import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.util.RandomSource; -import net.minecraft.world.Containers; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.GameType; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseEntityBlock; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.Vec3; -import net.neoforged.neoforge.items.IItemHandler; import net.neoforged.neoforge.network.PacketDistributor; import org.jetbrains.annotations.Nullable; -public class AutoRoyalGrindstoneBlock extends BetterBaseEntityBlock implements IHammerRemovable { - public static final BooleanProperty POWERED = BlockStateProperties.POWERED; - public static final BooleanProperty OVERLOAD = IPowerComponent.OVERLOAD; +public class AutoRoyalGrindstoneBlock extends AutoMachineBlock { public AutoRoyalGrindstoneBlock(Properties properties) { super(properties); - this.registerDefaultState(this.stateDefinition - .any() - .setValue(POWERED, false) - .setValue(OVERLOAD, true)); } @Override @@ -52,26 +32,6 @@ protected MapCodec codec() { return simpleCodec(AutoRoyalGrindstoneBlock::new); } - @Override - public boolean hasAnalogOutputSignal(BlockState blockState) { - return true; - } - - @Override - public int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) { - BlockEntity blockEntity = level.getBlockEntity(blockPos); - if (blockEntity instanceof AutoRoyalGrindstoneBlockEntity autoRoyalGrindstoneBlockEntity) { - return autoRoyalGrindstoneBlockEntity.getRedstoneSignal(); - } - return 0; - } - - @Override - public RenderShape getRenderShape(BlockState state) { - return RenderShape.MODEL; - } - - @Nullable @Override public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return new AutoRoyalGrindstoneBlockEntity(AddonBlockEntities.AUTO_ROYAL_GRINDSTONE.get(), pos, state); @@ -99,67 +59,6 @@ public InteractionResult use( return InteractionResult.SUCCESS; } - - @Override - public void onRemove( - BlockState state, - Level level, - BlockPos pos, - BlockState newState, - boolean movedByPiston - ) { - if (state.is(newState.getBlock())) return; - if (level.getBlockEntity(pos) instanceof AutoRoyalGrindstoneBlockEntity entity) { - Vec3 vec3 = entity.getBlockPos().getCenter(); - IItemHandler itemHandler = entity.getItemHandler(); - for (int slot = 0; slot < itemHandler.getSlots(); slot++) { - Containers.dropItemStack(level, vec3.x, vec3.y, vec3.z, itemHandler.getStackInSlot(slot)); - } - level.updateNeighbourForOutputSignal(pos, this); - } - super.onRemove(state, level, pos, newState, movedByPiston); - } - - - @Nullable - public BlockState getStateForPlacement(BlockPlaceContext context) { - return this.defaultBlockState() - .setValue(POWERED, context.getLevel().hasNeighborSignal(context.getClickedPos())) - .setValue(OVERLOAD, true); - } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(POWERED).add(OVERLOAD); - } - - @Override - public void neighborChanged( - BlockState state, - Level level, - BlockPos pos, - Block neighborBlock, - BlockPos neighborPos, - boolean movedByPiston - ) { - if (level.isClientSide) { - return; - } - level.setBlock(pos, state.setValue(POWERED, level.hasNeighborSignal(pos)), 2); - } - - @Override - public void tick( - BlockState state, - ServerLevel level, - BlockPos pos, - RandomSource random - ) { - if (state.getValue(POWERED) && !level.hasNeighborSignal(pos)) { - level.setBlock(pos, state.cycle(POWERED), 2); - } - } - @Override public @Nullable BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType type) { if (level.isClientSide) { diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/AutoRoyalSmithingTableBlock.java b/src/main/java/dev/anvilcraft/pigsplus/block/AutoRoyalSmithingTableBlock.java index 7192282..2143919 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/AutoRoyalSmithingTableBlock.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/AutoRoyalSmithingTableBlock.java @@ -4,47 +4,27 @@ import dev.anvilcraft.pigsplus.block.entity.AutoRoyalSmithingTableBlockEntity; import dev.anvilcraft.pigsplus.init.AddonBlockEntities; import dev.anvilcraft.pigsplus.init.AddonMenuTypes; -import dev.dubhe.anvilcraft.api.hammer.IHammerRemovable; -import dev.dubhe.anvilcraft.api.power.IPowerComponent; -import dev.dubhe.anvilcraft.block.better.BetterBaseEntityBlock; import dev.dubhe.anvilcraft.network.MachineOutputDirectionPacket; import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.util.RandomSource; -import net.minecraft.world.Containers; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.GameType; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseEntityBlock; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.Vec3; -import net.neoforged.neoforge.items.IItemHandler; import net.neoforged.neoforge.network.PacketDistributor; import org.jetbrains.annotations.Nullable; -public class AutoRoyalSmithingTableBlock extends BetterBaseEntityBlock implements IHammerRemovable { - public static final BooleanProperty POWERED = BlockStateProperties.POWERED; - public static final BooleanProperty OVERLOAD = IPowerComponent.OVERLOAD; +public class AutoRoyalSmithingTableBlock extends AutoMachineBlock { public AutoRoyalSmithingTableBlock(Properties properties) { super(properties); - this.registerDefaultState(this.stateDefinition - .any() - .setValue(POWERED, false) - .setValue(OVERLOAD, true)); } @Override @@ -52,26 +32,6 @@ protected MapCodec codec() { return simpleCodec(AutoRoyalSmithingTableBlock::new); } - @Override - public boolean hasAnalogOutputSignal(BlockState blockState) { - return true; - } - - @Override - public int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) { - BlockEntity blockEntity = level.getBlockEntity(blockPos); - if (blockEntity instanceof AutoRoyalSmithingTableBlockEntity autoRoyalSmithingTableBlockEntity) { - return autoRoyalSmithingTableBlockEntity.getRedstoneSignal(); - } - return 0; - } - - @Override - public RenderShape getRenderShape(BlockState state) { - return RenderShape.MODEL; - } - - @Nullable @Override public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return new AutoRoyalSmithingTableBlockEntity(AddonBlockEntities.AUTO_ROYAL_SMITHING_TABLE.get(), pos, state); @@ -99,67 +59,6 @@ public InteractionResult use( return InteractionResult.SUCCESS; } - - @Override - public void onRemove( - BlockState state, - Level level, - BlockPos pos, - BlockState newState, - boolean movedByPiston - ) { - if (state.is(newState.getBlock())) return; - if (level.getBlockEntity(pos) instanceof AutoRoyalSmithingTableBlockEntity entity) { - Vec3 vec3 = entity.getBlockPos().getCenter(); - IItemHandler itemHandler = entity.getItemHandler(); - for (int slot = 0; slot < itemHandler.getSlots(); slot++) { - Containers.dropItemStack(level, vec3.x, vec3.y, vec3.z, itemHandler.getStackInSlot(slot)); - } - level.updateNeighbourForOutputSignal(pos, this); - } - super.onRemove(state, level, pos, newState, movedByPiston); - } - - - @Nullable - public BlockState getStateForPlacement(BlockPlaceContext context) { - return this.defaultBlockState() - .setValue(POWERED, context.getLevel().hasNeighborSignal(context.getClickedPos())) - .setValue(OVERLOAD, true); - } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(POWERED).add(OVERLOAD); - } - - @Override - public void neighborChanged( - BlockState state, - Level level, - BlockPos pos, - Block neighborBlock, - BlockPos neighborPos, - boolean movedByPiston - ) { - if (level.isClientSide) { - return; - } - level.setBlock(pos, state.setValue(POWERED, level.hasNeighborSignal(pos)), 2); - } - - @Override - public void tick( - BlockState state, - ServerLevel level, - BlockPos pos, - RandomSource random - ) { - if (state.getValue(POWERED) && !level.hasNeighborSignal(pos)) { - level.setBlock(pos, state.cycle(POWERED), 2); - } - } - @Override public @Nullable BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType type) { if (level.isClientSide) { From 762e957c7910922d03900ecb94c658b2a2ffa2ba Mon Sep 17 00:00:00 2001 From: TBPig <147127248+TBPig@users.noreply.github.com> Date: Sun, 1 Feb 2026 17:10:22 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=90=88=E5=B9=B6AutoMachineMenu=E7=9A=84?= =?UTF-8?q?=E5=85=AC=E5=85=B1=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventory/AutoJewelCraftingMenu.java | 100 ++-------------- .../pigsplus/inventory/AutoMachineMenu.java | 110 ++++++++++++++++++ .../inventory/AutoRoyalGrindstoneMenu.java | 106 ++--------------- .../inventory/AutoRoyalSmithingMenu.java | 106 ++--------------- 4 files changed, 142 insertions(+), 280 deletions(-) create mode 100644 src/main/java/dev/anvilcraft/pigsplus/inventory/AutoMachineMenu.java diff --git a/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoJewelCraftingMenu.java b/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoJewelCraftingMenu.java index 916e84d..0ac47d5 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoJewelCraftingMenu.java +++ b/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoJewelCraftingMenu.java @@ -2,7 +2,6 @@ import dev.anvilcraft.pigsplus.block.entity.AutoJewelCraftingTableBlockEntity; import dev.anvilcraft.pigsplus.init.AddonBlocks; -import dev.dubhe.anvilcraft.inventory.BaseMachineMenu; import dev.dubhe.anvilcraft.inventory.component.ReadOnlySlot; import dev.dubhe.anvilcraft.recipe.JewelCraftingRecipe; import dev.dubhe.anvilcraft.recipe.anvil.cache.RecipeCaches; @@ -11,24 +10,20 @@ import net.minecraft.world.SimpleContainer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.ContainerLevelAccess; -import net.minecraft.world.inventory.ContainerListener; import net.minecraft.world.inventory.MenuType; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.neoforged.neoforge.items.IItemHandler; import net.neoforged.neoforge.items.SlotItemHandler; @Getter -public class AutoJewelCraftingMenu extends BaseMachineMenu implements ContainerListener { +public class AutoJewelCraftingMenu extends AutoMachineMenu { public final AutoJewelCraftingTableBlockEntity blockEntity; @Getter private final Slot resultSlot; - private final Level level; public AutoJewelCraftingMenu( MenuType menuType, int containerId, Inventory inventory, FriendlyByteBuf extraData @@ -45,14 +40,10 @@ public AutoJewelCraftingMenu( * @param blockEntity 方块实体 */ public AutoJewelCraftingMenu(MenuType menuType, int containerId, Inventory inventory, BlockEntity blockEntity) { - super(menuType, containerId, blockEntity); + super(menuType, containerId, inventory, blockEntity); AutoJewelCraftingMenu.checkContainerSize(inventory, 9); - this.blockEntity = (AutoJewelCraftingTableBlockEntity) blockEntity; - this.level = inventory.player.level(); - this.addPlayerHotbar(inventory); - this.addPlayerInventory(inventory); this.addMachine(); this.addSlot(resultSlot = new ReadOnlySlot(new SimpleContainer(1), 0, 134, 51)); @@ -60,6 +51,11 @@ public AutoJewelCraftingMenu(MenuType menuType, int containerId, Inventory in this.addSlotListener(this); } + @Override + protected int get_te_inventory_slot_count() { + return 5; + } + public class JewelCraftingSlotItemHandler extends SlotItemHandler { public JewelCraftingSlotItemHandler(IItemHandler itemHandler, int index, int xPosition, int yPosition) { super(itemHandler, index, xPosition, yPosition); @@ -90,82 +86,19 @@ public boolean mayPlace(ItemStack stack) { } } - private void addMachine() { + protected void addMachine() { this.addSlot(new JewelCraftingSlotItemHandler(this.blockEntity.getItemHandler(), 0, 80, 19)); for (int i = 0; i < 4; i++) { addSlot(new JewelCraftingSlotItemHandler(this.blockEntity.getItemHandler(), i + 1, 26 + i * 18, 51)); } } - private void addPlayerInventory(Inventory playerInventory) { - for (int i = 0; i < 3; ++i) { - for (int l = 0; l < 9; ++l) { - this.addSlot(new Slot(playerInventory, l + i * 9 + 9, 8 + l * 18, 84 + i * 18)); - } - } - } - private void addPlayerHotbar(Inventory playerInventory) { - for (int i = 0; i < 9; ++i) { - this.addSlot(new Slot(playerInventory, i, 8 + i * 18, 142)); - } - } - - private void onChanged() { + protected void onChanged() { blockEntity.calcResult(); this.resultSlot.set(blockEntity.getResultStack()); } - public static final int HOTBAR_SLOT_COUNT = 9; - public static final int PLAYER_INVENTORY_ROW_COUNT = 3; - public static final int PLAYER_INVENTORY_COLUMN_COUNT = 9; - public static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT; - public static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; - public static final int VANILLA_FIRST_SLOT_INDEX = 0; - public static final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT; - - // THIS YOU HAVE TO DEFINE! - private static final int TE_INVENTORY_SLOT_COUNT = 5; // must be the number of slots you have! - - - @Override - public ItemStack quickMoveStack(Player player, int index) { - Slot sourceSlot = slots.get(index); - if (!sourceSlot.hasItem()) { - return ItemStack.EMPTY; // EMPTY_ITEM - } - ItemStack sourceStack = sourceSlot.getItem(); - final ItemStack copyOfSourceStack = sourceStack.copy(); - - //noinspection ConstantValue - if (sourceSlot == null || !sourceSlot.hasItem()) { - return ItemStack.EMPTY; - } - if (index < TE_INVENTORY_FIRST_SLOT_INDEX) { - if (!moveItemToActiveSlot(sourceStack)) { - return ItemStack.EMPTY; - } - } else if (index < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) { - if (!moveItemStackTo( - sourceStack, - VANILLA_FIRST_SLOT_INDEX, - TE_INVENTORY_FIRST_SLOT_INDEX, - false - )) { - return ItemStack.EMPTY; - } - } else { - return ItemStack.EMPTY; - } - // If stack size == 0 (the entire stack was moved) set slot contents to null - if (sourceStack.getCount() == 0) { - sourceSlot.set(ItemStack.EMPTY); - } else { - sourceSlot.setChanged(); - } - sourceSlot.onTake(player, sourceStack); - return copyOfSourceStack; - } @Override public boolean stillValid(Player player) { @@ -177,23 +110,14 @@ public boolean stillValid(Player player) { } // 移动物品到可用槽位 - private boolean moveItemToActiveSlot(ItemStack stack) { + protected boolean moveItemToActiveSlot(ItemStack stack) { int start_index = TE_INVENTORY_FIRST_SLOT_INDEX; int count = stack.getCount(); if (RecipeCaches.getAllJewelResultItem().contains(stack.getItem())) { - moveItemStackTo(stack, start_index, start_index + TE_INVENTORY_SLOT_COUNT, false); + moveItemStackTo(stack, start_index, start_index + get_te_inventory_slot_count(), false); } else { - moveItemStackTo(stack, start_index + 1, start_index + TE_INVENTORY_SLOT_COUNT, false); + moveItemStackTo(stack, start_index + 1, start_index + get_te_inventory_slot_count(), false); } return stack.getCount() < count; } - - @Override - public void slotChanged(AbstractContainerMenu abstractContainerMenu, int i, ItemStack itemStack) { - onChanged(); - } - - @Override - public void dataChanged(AbstractContainerMenu abstractContainerMenu, int i, int i1) { - } } \ No newline at end of file diff --git a/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoMachineMenu.java b/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoMachineMenu.java new file mode 100644 index 0000000..7119e05 --- /dev/null +++ b/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoMachineMenu.java @@ -0,0 +1,110 @@ +package dev.anvilcraft.pigsplus.inventory; + +import dev.dubhe.anvilcraft.inventory.BaseMachineMenu; +import lombok.Getter; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ContainerListener; +import net.minecraft.world.inventory.MenuType; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; + +@Getter +public abstract class AutoMachineMenu extends BaseMachineMenu implements ContainerListener { + // 功劳归于:: diesieben07 | https://github.com/diesieben07/SevenCommons + // 必须为 GUI 使用的每个插槽分配一个插槽编号. + // 对于这个容器,我们可以看到瓷砖库存的插槽以及玩家库存插槽和快捷栏. + // 每次我们向容器添加 Slot 时,它都会自动增加 slotIndex,这意味着 + // 0 - 8 = 快捷栏插槽(将映射到 InventoryPlayer 插槽编号 0 - 8) + // 9 - 35 = 玩家物品栏(映射到 InventoryPlayer 插槽编号 9 - 35) + // 36 - (36+n) = TileInventory 插槽,映射到我们的Entity 插槽编号 0 - n) + public static final int HOTBAR_SLOT_COUNT = 9; + public static final int PLAYER_INVENTORY_ROW_COUNT = 3; + public static final int PLAYER_INVENTORY_COLUMN_COUNT = 9; + public static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT; + public static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; + public static final int VANILLA_FIRST_SLOT_INDEX = 0; + public static final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT; + + protected final Level level; + + protected AutoMachineMenu(MenuType menuType, int containerId, Inventory inventory, BlockEntity blockEntity) { + super(menuType, containerId, blockEntity); + this.level = inventory.player.level(); + + this.addPlayerHotbar(inventory); + this.addPlayerInventory(inventory); + } + + private void addPlayerInventory(Inventory playerInventory) { + for (int i = 0; i < 3; ++i) { + for (int l = 0; l < 9; ++l) { + addSlot(new Slot(playerInventory, l + i * 9 + 9, 8 + l * 18, 84 + i * 18)); + } + } + } + + private void addPlayerHotbar(Inventory playerInventory) { + for (int i = 0; i < 9; ++i) { + addSlot(new Slot(playerInventory, i, 8 + i * 18, 142)); + } + } + + @Override + public ItemStack quickMoveStack(Player player, int index) { + Slot sourceSlot = slots.get(index); + //noinspection ConstantValue + if (sourceSlot == null || !sourceSlot.hasItem()) { + return ItemStack.EMPTY; // EMPTY_ITEM + } + ItemStack sourceStack = sourceSlot.getItem(); + final ItemStack copyOfSourceStack = sourceStack.copy(); + + //noinspection ConstantValue + if (sourceSlot == null || !sourceSlot.hasItem()) { + return ItemStack.EMPTY; + } + if (index < TE_INVENTORY_FIRST_SLOT_INDEX) { + if (!moveItemToActiveSlot(sourceStack)) { + return ItemStack.EMPTY; + } + } else if (index < TE_INVENTORY_FIRST_SLOT_INDEX + get_te_inventory_slot_count()) { + if (!moveItemStackTo( + sourceStack, + VANILLA_FIRST_SLOT_INDEX, + TE_INVENTORY_FIRST_SLOT_INDEX, + false + )) { + return ItemStack.EMPTY; + } + } else { + return ItemStack.EMPTY; + } + // If stack size == 0 (the entire stack was moved) set slot contents to null + if (sourceStack.getCount() == 0) { + sourceSlot.set(ItemStack.EMPTY); + } else { + sourceSlot.setChanged(); + } + sourceSlot.onTake(player, sourceStack); + return copyOfSourceStack; + } + + protected abstract int get_te_inventory_slot_count(); + + protected abstract boolean moveItemToActiveSlot(ItemStack stack); + + protected abstract void onChanged(); + + @Override + public void slotChanged(AbstractContainerMenu abstractContainerMenu, int i, ItemStack itemStack) { + onChanged(); + } + + @Override + public void dataChanged(AbstractContainerMenu abstractContainerMenu, int i, int i1) { + } +} diff --git a/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoRoyalGrindstoneMenu.java b/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoRoyalGrindstoneMenu.java index f3e7a73..5447691 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoRoyalGrindstoneMenu.java +++ b/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoRoyalGrindstoneMenu.java @@ -2,33 +2,28 @@ import dev.anvilcraft.pigsplus.block.entity.AutoRoyalGrindstoneBlockEntity; import dev.anvilcraft.pigsplus.init.AddonBlocks; -import dev.dubhe.anvilcraft.inventory.BaseMachineMenu; import dev.dubhe.anvilcraft.inventory.component.ReadOnlySlot; import lombok.Getter; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.SimpleContainer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.ContainerLevelAccess; -import net.minecraft.world.inventory.ContainerListener; import net.minecraft.world.inventory.MenuType; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.neoforged.neoforge.items.SlotItemHandler; import static dev.dubhe.anvilcraft.inventory.RoyalGrindstoneMenu.REPAIR_COST_RECIPES; @Getter -public class AutoRoyalGrindstoneMenu extends BaseMachineMenu implements ContainerListener { +public class AutoRoyalGrindstoneMenu extends AutoMachineMenu { public final AutoRoyalGrindstoneBlockEntity blockEntity; @Getter private final Slot resultToolSlot; @Getter private final Slot resultMaterialSlot; - private final Level level; public AutoRoyalGrindstoneMenu( MenuType menuType, int containerId, Inventory inventory, FriendlyByteBuf extraData @@ -45,14 +40,10 @@ public AutoRoyalGrindstoneMenu( * @param blockEntity 方块实体 */ public AutoRoyalGrindstoneMenu(MenuType menuType, int containerId, Inventory inventory, BlockEntity blockEntity) { - super(menuType, containerId, blockEntity); + super(menuType, containerId, inventory, blockEntity); AutoRoyalGrindstoneMenu.checkContainerSize(inventory, 9); - this.blockEntity = (AutoRoyalGrindstoneBlockEntity) blockEntity; - this.level = inventory.player.level(); - this.addPlayerHotbar(inventory); - this.addPlayerInventory(inventory); this.addMachine(); this.addSlot(resultToolSlot = new ReadOnlySlot(new SimpleContainer(1), 0, 145, 34)); this.addSlot(resultMaterialSlot = new ReadOnlySlot(new SimpleContainer(1), 0, 89, 47)); @@ -61,87 +52,21 @@ public AutoRoyalGrindstoneMenu(MenuType menuType, int containerId, Inventory this.addSlotListener(this); } - private void addMachine() { - addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 0, 25, 34)); - addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 1, 89, 22)); - } - - private void addPlayerInventory(Inventory playerInventory) { - for (int i = 0; i < 3; ++i) { - for (int l = 0; l < 9; ++l) { - addSlot(new Slot(playerInventory, l + i * 9 + 9, 8 + l * 18, 84 + i * 18)); - } - } + @Override + protected int get_te_inventory_slot_count() { + return 2; } - private void addPlayerHotbar(Inventory playerInventory) { - for (int i = 0; i < 9; ++i) { - addSlot(new Slot(playerInventory, i, 8 + i * 18, 142)); - } + protected void addMachine() { + addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 0, 25, 34)); + addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 1, 89, 22)); } - private void onChanged() { + protected void onChanged() { this.resultToolSlot.set(blockEntity.getResultToolStack()); this.resultMaterialSlot.set(blockEntity.getResultMaterialStack()); } - - // 功劳归于:: diesieben07 | https://github.com/diesieben07/SevenCommons - // 必须为 GUI 使用的每个插槽分配一个插槽编号. - // 对于这个容器,我们可以看到瓷砖库存的插槽以及玩家库存插槽和快捷栏. - // 每次我们向容器添加 Slot 时,它都会自动增加 slotIndex,这意味着 - // 0 - 8 = 快捷栏插槽(将映射到 InventoryPlayer 插槽编号 0 - 8) - // 9 - 35 = 玩家物品栏(映射到 InventoryPlayer 插槽编号 9 - 35) - // 36 - 38 = TileInventory 插槽,映射到我们的 TileEntity 插槽编号 0 - 8) - public static final int HOTBAR_SLOT_COUNT = 9; - public static final int PLAYER_INVENTORY_ROW_COUNT = 3; - public static final int PLAYER_INVENTORY_COLUMN_COUNT = 9; - public static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT; - public static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; - public static final int VANILLA_FIRST_SLOT_INDEX = 0; - public static final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT; - - // THIS YOU HAVE TO DEFINE! - private static final int TE_INVENTORY_SLOT_COUNT = 2; // must be the number of slots you have! - - @Override - public ItemStack quickMoveStack(Player player, int index) { - Slot sourceSlot = slots.get(index); - //noinspection ConstantValue - if (sourceSlot == null || !sourceSlot.hasItem()) { - return ItemStack.EMPTY; // EMPTY_ITEM - } - ItemStack sourceStack = sourceSlot.getItem(); - final ItemStack copyOfSourceStack = sourceStack.copy(); - // Check if the slot clicked is one of the vanilla container slots - if (index < TE_INVENTORY_FIRST_SLOT_INDEX) { - // This is a vanilla container slot so merge the stack into the tile inventory - if (!moveItemToActiveSlot(sourceStack)) { - return ItemStack.EMPTY; // EMPTY_ITEM - } - } else if (index < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) { - // This is a TE slot so merge the stack into the players inventory - if (!moveItemStackTo( - sourceStack, - VANILLA_FIRST_SLOT_INDEX, - TE_INVENTORY_FIRST_SLOT_INDEX, - false - )) { - return ItemStack.EMPTY; - } - } else { - return ItemStack.EMPTY; - } - // If stack size == 0 (the entire stack was moved) set slot contents to null - if (sourceStack.getCount() == 0) { - sourceSlot.set(ItemStack.EMPTY); - } else { - sourceSlot.setChanged(); - } - sourceSlot.onTake(player, sourceStack); - return copyOfSourceStack; - } - @Override public boolean stillValid(Player player) { return stillValid( @@ -152,7 +77,7 @@ public boolean stillValid(Player player) { } // 移动物品到可用槽位 - private boolean moveItemToActiveSlot(ItemStack stack) { + protected boolean moveItemToActiveSlot(ItemStack stack) { int start_index = TE_INVENTORY_FIRST_SLOT_INDEX; int count = stack.getCount(); if (!REPAIR_COST_RECIPES.containsKey(stack.getItem())) { @@ -162,15 +87,4 @@ private boolean moveItemToActiveSlot(ItemStack stack) { } return stack.getCount() < count; } - - - @Override - public void slotChanged(AbstractContainerMenu abstractContainerMenu, int i, ItemStack itemStack) { - onChanged(); - } - - @Override - public void dataChanged(AbstractContainerMenu abstractContainerMenu, int i, int i1) { - } - } \ No newline at end of file diff --git a/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoRoyalSmithingMenu.java b/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoRoyalSmithingMenu.java index 350983d..e2ff589 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoRoyalSmithingMenu.java +++ b/src/main/java/dev/anvilcraft/pigsplus/inventory/AutoRoyalSmithingMenu.java @@ -2,34 +2,29 @@ import dev.anvilcraft.pigsplus.block.entity.AutoRoyalSmithingTableBlockEntity; import dev.anvilcraft.pigsplus.init.AddonBlocks; -import dev.dubhe.anvilcraft.inventory.BaseMachineMenu; import dev.dubhe.anvilcraft.inventory.component.ReadOnlySlot; import lombok.Getter; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.SimpleContainer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.ContainerLevelAccess; -import net.minecraft.world.inventory.ContainerListener; import net.minecraft.world.inventory.MenuType; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.item.crafting.SmithingRecipe; -import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.neoforged.neoforge.items.SlotItemHandler; import java.util.List; @Getter -public class AutoRoyalSmithingMenu extends BaseMachineMenu implements ContainerListener { +public class AutoRoyalSmithingMenu extends AutoMachineMenu { public final AutoRoyalSmithingTableBlockEntity blockEntity; @Getter private final Slot resultSlot; - private final Level level; private final List> recipes; public AutoRoyalSmithingMenu( @@ -47,15 +42,11 @@ public AutoRoyalSmithingMenu( * @param blockEntity 方块实体 */ public AutoRoyalSmithingMenu(MenuType menuType, int containerId, Inventory inventory, BlockEntity blockEntity) { - super(menuType, containerId, blockEntity); + super(menuType, containerId, inventory, blockEntity); AutoRoyalSmithingMenu.checkContainerSize(inventory, 9); - this.blockEntity = (AutoRoyalSmithingTableBlockEntity) blockEntity; - this.level = inventory.player.level(); this.recipes = level.getRecipeManager().getAllRecipesFor(RecipeType.SMITHING); - this.addPlayerHotbar(inventory); - this.addPlayerInventory(inventory); this.addMachine(); this.addSlot(resultSlot = new ReadOnlySlot(new SimpleContainer(1), 0, 106, 48)); @@ -63,88 +54,22 @@ public AutoRoyalSmithingMenu(MenuType menuType, int containerId, Inventory in this.addSlotListener(this); } - private void addMachine() { + @Override + protected int get_te_inventory_slot_count() { + return 3; + } + + protected void addMachine() { addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 0, 8, 48)); addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 1, 44, 48)); addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 2, 62, 48)); } - private void addPlayerInventory(Inventory playerInventory) { - for (int i = 0; i < 3; ++i) { - for (int l = 0; l < 9; ++l) { - addSlot(new Slot(playerInventory, l + i * 9 + 9, 8 + l * 18, 84 + i * 18)); - } - } - } - - private void addPlayerHotbar(Inventory playerInventory) { - for (int i = 0; i < 9; ++i) { - addSlot(new Slot(playerInventory, i, 8 + i * 18, 142)); - } - } - - private void onChanged() { + protected void onChanged() { ItemStack resultItem = blockEntity.getResult(); this.resultSlot.set(resultItem); } - - // 功劳归于:: diesieben07 | https://github.com/diesieben07/SevenCommons - // 必须为 GUI 使用的每个插槽分配一个插槽编号. - // 对于这个容器,我们可以看到瓷砖库存的插槽以及玩家库存插槽和快捷栏. - // 每次我们向容器添加 Slot 时,它都会自动增加 slotIndex,这意味着 - // 0 - 8 = 快捷栏插槽(将映射到 InventoryPlayer 插槽编号 0 - 8) - // 9 - 35 = 玩家物品栏(映射到 InventoryPlayer 插槽编号 9 - 35) - // 36 - 38 = TileInventory 插槽,映射到我们的 TileEntity 插槽编号 0 - 8) - public static final int HOTBAR_SLOT_COUNT = 9; - public static final int PLAYER_INVENTORY_ROW_COUNT = 3; - public static final int PLAYER_INVENTORY_COLUMN_COUNT = 9; - public static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT; - public static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; - public static final int VANILLA_FIRST_SLOT_INDEX = 0; - public static final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT; - - // THIS YOU HAVE TO DEFINE! - private static final int TE_INVENTORY_SLOT_COUNT = 3; // must be the number of slots you have! - - @Override - public ItemStack quickMoveStack(Player player, int index) { - Slot sourceSlot = slots.get(index); - //noinspection ConstantValue - if (sourceSlot == null || !sourceSlot.hasItem()) { - return ItemStack.EMPTY; // EMPTY_ITEM - } - ItemStack sourceStack = sourceSlot.getItem(); - final ItemStack copyOfSourceStack = sourceStack.copy(); - // Check if the slot clicked is one of the vanilla container slots - if (index < TE_INVENTORY_FIRST_SLOT_INDEX) { - // This is a vanilla container slot so merge the stack into the tile inventory - if (!moveItemToActiveSlot(sourceStack)) { - return ItemStack.EMPTY; // EMPTY_ITEM - } - } else if (index < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) { - // This is a TE slot so merge the stack into the players inventory - if (!moveItemStackTo( - sourceStack, - VANILLA_FIRST_SLOT_INDEX, - TE_INVENTORY_FIRST_SLOT_INDEX, - false - )) { - return ItemStack.EMPTY; - } - } else { - return ItemStack.EMPTY; - } - // If stack size == 0 (the entire stack was moved) set slot contents to null - if (sourceStack.getCount() == 0) { - sourceSlot.set(ItemStack.EMPTY); - } else { - sourceSlot.setChanged(); - } - sourceSlot.onTake(player, sourceStack); - return copyOfSourceStack; - } - @Override public boolean stillValid(Player player) { return stillValid( @@ -155,7 +80,7 @@ public boolean stillValid(Player player) { } // 移动物品到可用槽位 - private boolean moveItemToActiveSlot(ItemStack stack) { + protected boolean moveItemToActiveSlot(ItemStack stack) { int start_index = TE_INVENTORY_FIRST_SLOT_INDEX; int count = stack.getCount(); // 检查是否为模板材料 @@ -173,15 +98,4 @@ else if (this.recipes.stream().anyMatch(smithingRecipe -> smithingRecipe.value() } return stack.getCount() < count; } - - - @Override - public void slotChanged(AbstractContainerMenu abstractContainerMenu, int i, ItemStack itemStack) { - onChanged(); - } - - @Override - public void dataChanged(AbstractContainerMenu abstractContainerMenu, int i, int i1) { - } - } \ No newline at end of file From 08b7e6dc5f1b71e08c58ea2322cc159928ad00b5 Mon Sep 17 00:00:00 2001 From: TBPig <147127248+TBPig@users.noreply.github.com> Date: Sun, 1 Feb 2026 20:30:53 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BD=BF=E5=BE=973=E4=B8=AA=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=9C=BA=E5=99=A8=E5=8F=AF=E4=BB=A5=E6=9C=9D6?= =?UTF-8?q?=E4=B8=AA=E6=96=B9=E5=90=91=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pigsplus/block/AutoMachineBlock.java | 29 +- .../AutoJewelCraftingTableBlockEntity.java | 6 + .../block/entity/AutoMachineBlockEntity.java | 51 +++- .../AutoRoyalGrindstoneBlockEntity.java | 49 +--- .../AutoRoyalSmithingTableBlockEntity.java | 6 + .../anvilcraft_guideme/auto_machine.md | 2 +- .../auto_jewel_crafting_table.json | 42 ++- .../blockstates/auto_royal_grindstone.json | 42 ++- .../auto_royal_smithing_table.json | 42 ++- .../block/auto_jewel_crafting_table.json | 18 +- .../block/auto_jewel_crafting_table_down.json | 273 ++++++++++++++++++ ...to_jewel_crafting_table_down_overload.json | 273 ++++++++++++++++++ .../auto_jewel_crafting_table_overload.json | 18 +- .../block/auto_jewel_crafting_table_up.json | 273 ++++++++++++++++++ ...auto_jewel_crafting_table_up_overload.json | 273 ++++++++++++++++++ .../models/block/auto_royal_grindstone.json | 20 +- .../block/auto_royal_grindstone_down.json | 246 ++++++++++++++++ .../auto_royal_grindstone_down_overload.json | 246 ++++++++++++++++ .../block/auto_royal_grindstone_overload.json | 20 +- .../block/auto_royal_grindstone_up.json | 246 ++++++++++++++++ .../auto_royal_grindstone_up_overload.json | 246 ++++++++++++++++ .../block/auto_royal_smithing_table.json | 18 +- .../block/auto_royal_smithing_table_down.json | 202 +++++++++++++ ...to_royal_smithing_table_down_overload.json | 202 +++++++++++++ .../auto_royal_smithing_table_overload.json | 18 +- .../block/auto_royal_smithing_table_up.json | 202 +++++++++++++ ...auto_royal_smithing_table_up_overload.json | 202 +++++++++++++ .../textures/block/auto_machine_frame.png | Bin 328 -> 352 bytes 28 files changed, 3145 insertions(+), 120 deletions(-) create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_down.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_down_overload.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_up.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_up_overload.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_down.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_down_overload.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_up.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_up_overload.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_down.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_down_overload.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_up.json create mode 100644 src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_up_overload.json diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/AutoMachineBlock.java b/src/main/java/dev/anvilcraft/pigsplus/block/AutoMachineBlock.java index 41f3691..e53aaf1 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/AutoMachineBlock.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/AutoMachineBlock.java @@ -5,23 +5,29 @@ import dev.dubhe.anvilcraft.api.power.IPowerComponent; import dev.dubhe.anvilcraft.block.better.BetterBaseEntityBlock; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.RandomSource; import net.minecraft.world.Containers; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.DirectionalBlock; +import net.minecraft.world.level.block.Mirror; import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.phys.Vec3; import net.neoforged.neoforge.items.IItemHandler; import org.jetbrains.annotations.Nullable; public abstract class AutoMachineBlock extends BetterBaseEntityBlock implements IHammerRemovable { + public static final DirectionProperty FACING = DirectionalBlock.FACING; public static final BooleanProperty POWERED = BlockStateProperties.POWERED; public static final BooleanProperty OVERLOAD = IPowerComponent.OVERLOAD; @@ -30,19 +36,25 @@ protected AutoMachineBlock(Properties properties) { this.registerDefaultState(this.stateDefinition .any() .setValue(POWERED, false) - .setValue(OVERLOAD, true)); + .setValue(OVERLOAD, true) + .setValue(FACING, Direction.NORTH)); } @Override protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(POWERED).add(OVERLOAD); + builder.add(POWERED).add(OVERLOAD).add(FACING); } @Nullable public BlockState getStateForPlacement(BlockPlaceContext context) { + Direction dir = context.getNearestLookingDirection().getOpposite(); + if (context.getPlayer() != null && context.getPlayer().isShiftKeyDown()) { + dir = dir.getOpposite(); + } return this.defaultBlockState() .setValue(POWERED, context.getLevel().hasNeighborSignal(context.getClickedPos())) - .setValue(OVERLOAD, true); + .setValue(OVERLOAD, true) + .setValue(FACING, dir); } @Override @@ -110,4 +122,15 @@ public void onRemove( } super.onRemove(state, level, pos, newState, movedByPiston); } + + @Override + public BlockState rotate(BlockState state, Rotation rotation) { + return state.setValue(FACING, rotation.rotate(state.getValue(FACING))); + } + + @Override + public BlockState mirror(BlockState state, Mirror mirror) { + return this.rotate(state, mirror.getRotation(state.getValue(FACING))); + } + } \ No newline at end of file diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoJewelCraftingTableBlockEntity.java b/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoJewelCraftingTableBlockEntity.java index 18c3a78..a902651 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoJewelCraftingTableBlockEntity.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoJewelCraftingTableBlockEntity.java @@ -21,6 +21,7 @@ import net.minecraft.world.item.enchantment.ItemEnchantments; import net.minecraft.world.level.GameRules; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -161,4 +162,9 @@ public AbstractContainerMenu createMenu(int i, Inventory inventory, Player playe public Component getDisplayName() { return Component.translatable("block.anvilcraft_pigsplus.auto_jewel_crafting_table"); } + + @Override + public Block getBlock() { + return AddonBlocks.AUTO_JEWEL_CRAFTING_TABLE_BLOCK.get(); + } } \ No newline at end of file diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoMachineBlockEntity.java b/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoMachineBlockEntity.java index 85d3b7b..9ad7054 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoMachineBlockEntity.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoMachineBlockEntity.java @@ -1,6 +1,7 @@ package dev.anvilcraft.pigsplus.block.entity; import dev.anvilcraft.pigsplus.AnvilCraftPigsPlus; +import dev.anvilcraft.pigsplus.block.AutoRoyalGrindstoneBlock; import dev.dubhe.anvilcraft.api.itemhandler.ItemHandlerUtil; import dev.dubhe.anvilcraft.api.power.IPowerConsumer; import dev.dubhe.anvilcraft.api.power.PowerGrid; @@ -18,6 +19,7 @@ import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -30,6 +32,7 @@ import org.jetbrains.annotations.Nullable; import org.joml.Vector3f; +import java.util.List; import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; @@ -74,6 +77,10 @@ public void tick(Level level, BlockPos pos) { protected abstract boolean work(Level level); protected boolean exportItem(ItemStack result) { + return exportItem(result, List.of()); + } + + protected boolean exportItem(ItemStack result, List byproducts) { Direction direction = getDirection(); IItemHandler cap = Objects.requireNonNull(getLevel()).getCapability( Capabilities.ItemHandler.BLOCK, @@ -84,7 +91,17 @@ protected boolean exportItem(ItemStack result) { // 尝试向容器插入物品 ItemStack remained = ItemHandlerUtil.insertItem(cap, result, true); if (!remained.isEmpty()) return false; + ItemHandlerUtil.insertItem(cap, result, false); + for (ItemStack byproduct : byproducts) { + remained = ItemHandlerUtil.insertItem(cap, byproduct, true); + if (remained.isEmpty()) { + ItemHandlerUtil.insertItem(cap, byproduct, false); + } else { + // 强制向世界喷出物品 + spawnItemEntity(byproduct); + } + } } else { // 尝试向世界喷出物品 Vec3 center = getBlockPos().relative(direction).getCenter(); @@ -92,6 +109,9 @@ protected boolean exportItem(ItemStack result) { if (!getLevel().noCollision(aabb)) return false; spawnItemEntity(result); + for (ItemStack byproduct : byproducts) { + spawnItemEntity(byproduct); + } } return true; } @@ -134,16 +154,6 @@ protected void saveAdditional(CompoundTag tag, HolderLookup.Provider provider) { tag.putInt("Cooldown", this.cooldown); } - @Override - public Direction getDirection() { - return Direction.UP; - } - - @Override - public void setDirection(Direction direction) { - return; - } - public int getRedstoneSignal() { /*输出等同于有物品的输入槽的数量的红石信号*/ int strength = 0; @@ -164,4 +174,25 @@ public BlockPos getPos() { public @Nullable Level getCurrentLevel() { return getLevel(); } + + + @Override + public Direction getDirection() { + if (this.level == null) return Direction.UP; + BlockState state = this.level.getBlockState(this.getBlockPos()); + if (!state.is(getBlock())) return Direction.UP; + return state.getValue(AutoRoyalGrindstoneBlock.FACING); + } + + @Override + public void setDirection(Direction direction) { + BlockPos pos = this.getBlockPos(); + Level level = this.getLevel(); + if (null == level) return; + BlockState state = level.getBlockState(pos); + if (!state.is(getBlock())) return; + level.setBlockAndUpdate(pos, state.setValue(AutoRoyalGrindstoneBlock.FACING, direction)); + } + + public abstract Block getBlock(); } diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoRoyalGrindstoneBlockEntity.java b/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoRoyalGrindstoneBlockEntity.java index cd9ea8a..d3da949 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoRoyalGrindstoneBlockEntity.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoRoyalGrindstoneBlockEntity.java @@ -3,11 +3,9 @@ import dev.anvilcraft.pigsplus.init.AddonBlocks; import dev.anvilcraft.pigsplus.init.AddonMenuTypes; import dev.anvilcraft.pigsplus.inventory.AutoRoyalGrindstoneMenu; -import dev.dubhe.anvilcraft.api.itemhandler.ItemHandlerUtil; import dev.dubhe.anvilcraft.inventory.RoyalGrindstoneMenu; import lombok.Getter; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; import net.minecraft.core.component.DataComponentType; @@ -24,18 +22,15 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraft.world.item.enchantment.ItemEnchantments; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.phys.AABB; -import net.minecraft.world.phys.Vec3; -import net.neoforged.neoforge.capabilities.Capabilities; -import net.neoforged.neoforge.items.IItemHandler; import net.neoforged.neoforge.items.ItemStackHandler; import org.jetbrains.annotations.Nullable; import java.util.Iterator; -import java.util.Objects; +import java.util.List; import static dev.dubhe.anvilcraft.inventory.RoyalGrindstoneMenu.DEFAULT_REPAIR_MATERIAL; import static dev.dubhe.anvilcraft.inventory.RoyalGrindstoneMenu.GOLD_PER_CURSE; @@ -134,7 +129,7 @@ protected boolean work(Level level) { calcResult(); if (resultToolStack.isEmpty()) return false; - if (!exportItem()) return false; + if (!exportItem(resultToolStack, List.of(resultMaterialStack))) return false; // 消耗输入物品 if (!itemHandler.getStackInSlot(1).isEmpty()) { @@ -148,39 +143,6 @@ protected boolean work(Level level) { return true; } - private boolean exportItem() { - Direction direction = getDirection(); - IItemHandler cap = Objects.requireNonNull(getLevel()).getCapability( - Capabilities.ItemHandler.BLOCK, - getBlockPos().relative(direction), - direction.getOpposite() - ); - if (cap != null) { - // 尝试向容器插入物品 - ItemStack remained = ItemHandlerUtil.insertItem(cap, resultToolStack, true); - if (!remained.isEmpty()) return false; - ItemHandlerUtil.insertItem(cap, resultToolStack, false); - - // 尝试向容器插入物品 - remained = ItemHandlerUtil.insertItem(cap, resultMaterialStack, true); - if (remained.isEmpty()) { - ItemHandlerUtil.insertItem(cap, resultMaterialStack, false); - } else { - // 强制向世界喷出物品 - spawnItemEntity(resultMaterialStack); - } - } else { - // 尝试向世界喷出物品 - Vec3 center = getBlockPos().relative(getDirection()).getCenter(); - AABB aabb = new AABB(center.add(-0.125, -0.125, -0.125), center.add(0.125, 0.125, 0.125)); - if (!getLevel().noCollision(aabb)) return false; - - spawnItemEntity(resultToolStack); - spawnItemEntity(resultMaterialStack); - } - return true; - } - @Override protected void loadAdditional(CompoundTag tag, HolderLookup.Provider provider) { super.loadAdditional(tag, provider); @@ -212,4 +174,9 @@ public AbstractContainerMenu createMenu(int i, Inventory inventory, Player playe public Component getDisplayName() { return Component.translatable("block.anvilcraft_pigsplus.auto_royal_grindstone"); } + + @Override + public Block getBlock() { + return AddonBlocks.AUTO_ROYAL_GRINDSTONE_BLOCK.get(); + } } \ No newline at end of file diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoRoyalSmithingTableBlockEntity.java b/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoRoyalSmithingTableBlockEntity.java index b21ede9..3382fff 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoRoyalSmithingTableBlockEntity.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/entity/AutoRoyalSmithingTableBlockEntity.java @@ -17,6 +17,7 @@ import net.minecraft.world.item.crafting.SmithingRecipe; import net.minecraft.world.item.crafting.SmithingRecipeInput; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -125,4 +126,9 @@ public AbstractContainerMenu createMenu(int i, Inventory inventory, Player playe public Component getDisplayName() { return Component.translatable("block.anvilcraft_pigsplus.auto_royal_smithing_table"); } + + @Override + public Block getBlock() { + return AddonBlocks.AUTO_ROYAL_SMITHING_TABLE_BLOCK.get(); + } } \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_guideme/anvilcraft_guideme/auto_machine.md b/src/main/resources/assets/anvilcraft_guideme/anvilcraft_guideme/auto_machine.md index aae482d..6664c41 100644 --- a/src/main/resources/assets/anvilcraft_guideme/anvilcraft_guideme/auto_machine.md +++ b/src/main/resources/assets/anvilcraft_guideme/anvilcraft_guideme/auto_machine.md @@ -30,4 +30,4 @@ item_ids: - 工作耗能16kW - 收到红石信号时,进行一次工作 -- 将产物向上弹射或存放至上方的容器 \ No newline at end of file +- 将产物存放至所朝方向容器,或喷射出来 \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_jewel_crafting_table.json b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_jewel_crafting_table.json index 72bf5f7..04c22fc 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_jewel_crafting_table.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_jewel_crafting_table.json @@ -1,10 +1,46 @@ { "variants": { - "overload=true": { - "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_overload" + "facing=up,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_up" + }, + "facing=down,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_down" }, - "overload=false": { + "facing=north,overload=false": { "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table" + }, + "facing=east,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table", + "y": 90 + }, + "facing=south,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table", + "y": 180 + }, + "facing=west,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table", + "y": 270 + }, + "facing=up,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_up_overload" + }, + "facing=down,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_down_overload" + }, + "facing=north,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_overload" + }, + "facing=east,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_overload", + "y": 90 + }, + "facing=south,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_overload", + "y": 180 + }, + "facing=west,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_overload", + "y": 270 } } } \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_royal_grindstone.json b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_royal_grindstone.json index 9d1e994..590e9ce 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_royal_grindstone.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_royal_grindstone.json @@ -1,10 +1,46 @@ { "variants": { - "overload=true": { - "model": "anvilcraft_pigsplus:block/auto_royal_grindstone_overload" + "facing=up,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone_up" + }, + "facing=down,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone_down" }, - "overload=false": { + "facing=north,overload=false": { "model": "anvilcraft_pigsplus:block/auto_royal_grindstone" + }, + "facing=east,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone", + "y": 90 + }, + "facing=south,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone", + "y": 180 + }, + "facing=west,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone", + "y": 270 + }, + "facing=up,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone_up_overload" + }, + "facing=down,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone_down_overload" + }, + "facing=north,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone_overload" + }, + "facing=east,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone_overload", + "y": 90 + }, + "facing=south,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone_overload", + "y": 180 + }, + "facing=west,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_grindstone_overload", + "y": 270 } } } \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_royal_smithing_table.json b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_royal_smithing_table.json index 9e3b7aa..f65ea61 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_royal_smithing_table.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_royal_smithing_table.json @@ -1,10 +1,46 @@ { "variants": { - "overload=true": { - "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table_overload" + "facing=up,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table_up" + }, + "facing=down,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table_down" }, - "overload=false": { + "facing=north,overload=false": { "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table" + }, + "facing=east,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table", + "y": 90 + }, + "facing=south,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table", + "y": 180 + }, + "facing=west,overload=false": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table", + "y": 270 + }, + "facing=up,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table_up_overload" + }, + "facing=down,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table_down_overload" + }, + "facing=north,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table_overload" + }, + "facing=east,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table_overload", + "y": 90 + }, + "facing=south,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table_overload", + "y": 180 + }, + "facing=west,overload=true": { + "model": "anvilcraft_pigsplus:block/auto_royal_smithing_table_overload", + "y": 270 } } } \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table.json index 5aecc50..ca48366 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table.json @@ -57,16 +57,16 @@ }, { "name": "output", - "from": [6, 16, 6], - "to": [10, 16, 10], - "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, + "from": [6, 10.5, 0.1], + "to": [10, 14.5, 0.1], + "rotation": {"angle": 45, "axis": "z", "origin": [8, 12.5, 0]}, "faces": { - "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, - "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + "north": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "rotation": 90, "texture": "#4"}, + "south": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "rotation": 270, "texture": "#4"}, + "up": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "down": {"uv": [0, 1, 2, 1], "rotation": 180, "texture": "#4"} } }, { diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_down.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_down.json new file mode 100644 index 0000000..c3d05bc --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_down.json @@ -0,0 +1,273 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "9": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_gems", + "12": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_stone", + "particle": "anvilcraft_pigsplus:block/auto_machine_base" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 0, 6], + "to": [10, 1, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 0.5, 8]}, + "faces": { + "north": {"uv": [0, 10, 4, 11], "rotation": 180, "texture": "#8"}, + "east": {"uv": [4, 10, 8, 11], "rotation": 180, "texture": "#8"}, + "south": {"uv": [0, 12, 4, 13], "rotation": 180, "texture": "#8"}, + "west": {"uv": [4, 12, 8, 13], "rotation": 180, "texture": "#8"}, + "up": {"uv": [12, 0, 16, 4], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 4, 16, 8], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [4, 8, 9], + "to": [8, 9, 12], + "rotation": {"angle": -22.5, "axis": "y", "origin": [4, 8, 9]}, + "faces": { + "north": {"uv": [3, 0, 7, 1], "texture": "#9"}, + "east": {"uv": [7, 4, 10, 5], "texture": "#9"}, + "south": {"uv": [3, 4, 7, 5], "texture": "#9"}, + "west": {"uv": [0, 4, 3, 5], "texture": "#9"}, + "up": {"uv": [3, 1, 7, 4], "texture": "#9"}, + "down": {"uv": [3, 5, 7, 8], "texture": "#9"} + } + }, + { + "from": [9, 8, 5], + "to": [12, 9, 8], + "rotation": {"angle": 45, "axis": "y", "origin": [9, 8, 5]}, + "faces": { + "north": {"uv": [13, 3, 16, 4], "texture": "#9"}, + "east": {"uv": [7, 3, 10, 4], "texture": "#9"}, + "south": {"uv": [10, 7, 13, 8], "texture": "#9"}, + "west": {"uv": [10, 3, 13, 4], "texture": "#9"}, + "up": {"uv": [10, 4, 13, 7], "texture": "#9"}, + "down": {"uv": [10, 0, 13, 3], "texture": "#9"} + } + }, + { + "from": [6.5, 9, 5], + "to": [9.5, 15, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 9, 5]}, + "faces": { + "north": {"uv": [0, 3, 1.5, 6], "texture": "#12"}, + "east": {"uv": [0, 0, 3, 3], "texture": "#12"}, + "south": {"uv": [2.5, 3, 4, 6], "texture": "#12"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#12"}, + "up": {"uv": [1.5, 3, 3, 6], "texture": "#12"}, + "down": {"uv": [4.5, 3, 6, 6], "texture": "#12"} + } + }, + { + "from": [5.5, 10.5, 6.5], + "to": [10.5, 13.5, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "east": {"uv": [3, 6, 4.5, 7.5], "texture": "#12"}, + "south": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "west": {"uv": [4.5, 6, 6, 7.5], "texture": "#12"}, + "up": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "down": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"} + } + }, + { + "from": [6, 8, 7], + "to": [7, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 8, 7]}, + "faces": { + "north": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "east": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "south": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "west": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "up": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"}, + "down": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"} + } + }, + { + "from": [9, 8, 7], + "to": [10, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]}, + "faces": { + "north": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "east": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "south": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "west": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "up": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"}, + "down": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "jewelry", + "origin": [8, 8, 8], + "color": 0, + "children": [12, 13, 14, 15, 16, 17] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_down_overload.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_down_overload.json new file mode 100644 index 0000000..a1f5b8c --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_down_overload.json @@ -0,0 +1,273 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base_overload", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "9": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_gems", + "12": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_stone", + "particle": "anvilcraft_pigsplus:block/auto_machine_base_overload" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 0, 6], + "to": [10, 1, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 0.5, 8]}, + "faces": { + "north": {"uv": [0, 10, 4, 11], "rotation": 180, "texture": "#8"}, + "east": {"uv": [4, 10, 8, 11], "rotation": 180, "texture": "#8"}, + "south": {"uv": [0, 12, 4, 13], "rotation": 180, "texture": "#8"}, + "west": {"uv": [4, 12, 8, 13], "rotation": 180, "texture": "#8"}, + "up": {"uv": [12, 0, 16, 4], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 4, 16, 8], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [4, 8, 9], + "to": [8, 9, 12], + "rotation": {"angle": -22.5, "axis": "y", "origin": [4, 8, 9]}, + "faces": { + "north": {"uv": [3, 0, 7, 1], "texture": "#9"}, + "east": {"uv": [7, 4, 10, 5], "texture": "#9"}, + "south": {"uv": [3, 4, 7, 5], "texture": "#9"}, + "west": {"uv": [0, 4, 3, 5], "texture": "#9"}, + "up": {"uv": [3, 1, 7, 4], "texture": "#9"}, + "down": {"uv": [3, 5, 7, 8], "texture": "#9"} + } + }, + { + "from": [9, 8, 5], + "to": [12, 9, 8], + "rotation": {"angle": 45, "axis": "y", "origin": [9, 8, 5]}, + "faces": { + "north": {"uv": [13, 3, 16, 4], "texture": "#9"}, + "east": {"uv": [7, 3, 10, 4], "texture": "#9"}, + "south": {"uv": [10, 7, 13, 8], "texture": "#9"}, + "west": {"uv": [10, 3, 13, 4], "texture": "#9"}, + "up": {"uv": [10, 4, 13, 7], "texture": "#9"}, + "down": {"uv": [10, 0, 13, 3], "texture": "#9"} + } + }, + { + "from": [6.5, 9, 5], + "to": [9.5, 15, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 9, 5]}, + "faces": { + "north": {"uv": [0, 3, 1.5, 6], "texture": "#12"}, + "east": {"uv": [0, 0, 3, 3], "texture": "#12"}, + "south": {"uv": [2.5, 3, 4, 6], "texture": "#12"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#12"}, + "up": {"uv": [1.5, 3, 3, 6], "texture": "#12"}, + "down": {"uv": [4.5, 3, 6, 6], "texture": "#12"} + } + }, + { + "from": [5.5, 10.5, 6.5], + "to": [10.5, 13.5, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "east": {"uv": [3, 6, 4.5, 7.5], "texture": "#12"}, + "south": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "west": {"uv": [4.5, 6, 6, 7.5], "texture": "#12"}, + "up": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "down": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"} + } + }, + { + "from": [6, 8, 7], + "to": [7, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 8, 7]}, + "faces": { + "north": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "east": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "south": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "west": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "up": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"}, + "down": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"} + } + }, + { + "from": [9, 8, 7], + "to": [10, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]}, + "faces": { + "north": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "east": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "south": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "west": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "up": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"}, + "down": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "jewelry", + "origin": [8, 8, 8], + "color": 0, + "children": [12, 13, 14, 15, 16, 17] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_overload.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_overload.json index 5a53267..aa9a65c 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_overload.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_overload.json @@ -57,16 +57,16 @@ }, { "name": "output", - "from": [6, 16, 6], - "to": [10, 16, 10], - "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, + "from": [6, 10.5, 0.1], + "to": [10, 14.5, 0.1], + "rotation": {"angle": 45, "axis": "z", "origin": [8, 12.5, 0]}, "faces": { - "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, - "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + "north": {"uv": [11, 5, 13, 7], "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "rotation": 90, "texture": "#4"}, + "south": {"uv": [11, 5, 13, 7], "rotation": 180, "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "rotation": 270, "texture": "#4"}, + "up": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "down": {"uv": [0, 1, 2, 1], "rotation": 180, "texture": "#4"} } }, { diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_up.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_up.json new file mode 100644 index 0000000..5aecc50 --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_up.json @@ -0,0 +1,273 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "9": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_gems", + "12": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_stone", + "particle": "anvilcraft_pigsplus:block/auto_machine_base" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 16, 6], + "to": [10, 16, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, + "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [4, 8, 9], + "to": [8, 9, 12], + "rotation": {"angle": -22.5, "axis": "y", "origin": [4, 8, 9]}, + "faces": { + "north": {"uv": [3, 0, 7, 1], "texture": "#9"}, + "east": {"uv": [7, 4, 10, 5], "texture": "#9"}, + "south": {"uv": [3, 4, 7, 5], "texture": "#9"}, + "west": {"uv": [0, 4, 3, 5], "texture": "#9"}, + "up": {"uv": [3, 1, 7, 4], "texture": "#9"}, + "down": {"uv": [3, 5, 7, 8], "texture": "#9"} + } + }, + { + "from": [9, 8, 5], + "to": [12, 9, 8], + "rotation": {"angle": 45, "axis": "y", "origin": [9, 8, 5]}, + "faces": { + "north": {"uv": [13, 3, 16, 4], "texture": "#9"}, + "east": {"uv": [7, 3, 10, 4], "texture": "#9"}, + "south": {"uv": [10, 7, 13, 8], "texture": "#9"}, + "west": {"uv": [10, 3, 13, 4], "texture": "#9"}, + "up": {"uv": [10, 4, 13, 7], "texture": "#9"}, + "down": {"uv": [10, 0, 13, 3], "texture": "#9"} + } + }, + { + "from": [6.5, 9, 5], + "to": [9.5, 15, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 9, 5]}, + "faces": { + "north": {"uv": [0, 3, 1.5, 6], "texture": "#12"}, + "east": {"uv": [0, 0, 3, 3], "texture": "#12"}, + "south": {"uv": [2.5, 3, 4, 6], "texture": "#12"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#12"}, + "up": {"uv": [1.5, 3, 3, 6], "texture": "#12"}, + "down": {"uv": [4.5, 3, 6, 6], "texture": "#12"} + } + }, + { + "from": [5.5, 10.5, 6.5], + "to": [10.5, 13.5, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "east": {"uv": [3, 6, 4.5, 7.5], "texture": "#12"}, + "south": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "west": {"uv": [4.5, 6, 6, 7.5], "texture": "#12"}, + "up": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "down": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"} + } + }, + { + "from": [6, 8, 7], + "to": [7, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 8, 7]}, + "faces": { + "north": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "east": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "south": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "west": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "up": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"}, + "down": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"} + } + }, + { + "from": [9, 8, 7], + "to": [10, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]}, + "faces": { + "north": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "east": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "south": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "west": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "up": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"}, + "down": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "jewelry", + "origin": [8, 8, 8], + "color": 0, + "children": [12, 13, 14, 15, 16, 17] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_up_overload.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_up_overload.json new file mode 100644 index 0000000..5a53267 --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_jewel_crafting_table_up_overload.json @@ -0,0 +1,273 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base_overload", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "9": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_gems", + "12": "anvilcraft_pigsplus:block/auto_jewel_crafting_table_stone", + "particle": "anvilcraft_pigsplus:block/auto_machine_base_overload" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 16, 6], + "to": [10, 16, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, + "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [4, 8, 9], + "to": [8, 9, 12], + "rotation": {"angle": -22.5, "axis": "y", "origin": [4, 8, 9]}, + "faces": { + "north": {"uv": [3, 0, 7, 1], "texture": "#9"}, + "east": {"uv": [7, 4, 10, 5], "texture": "#9"}, + "south": {"uv": [3, 4, 7, 5], "texture": "#9"}, + "west": {"uv": [0, 4, 3, 5], "texture": "#9"}, + "up": {"uv": [3, 1, 7, 4], "texture": "#9"}, + "down": {"uv": [3, 5, 7, 8], "texture": "#9"} + } + }, + { + "from": [9, 8, 5], + "to": [12, 9, 8], + "rotation": {"angle": 45, "axis": "y", "origin": [9, 8, 5]}, + "faces": { + "north": {"uv": [13, 3, 16, 4], "texture": "#9"}, + "east": {"uv": [7, 3, 10, 4], "texture": "#9"}, + "south": {"uv": [10, 7, 13, 8], "texture": "#9"}, + "west": {"uv": [10, 3, 13, 4], "texture": "#9"}, + "up": {"uv": [10, 4, 13, 7], "texture": "#9"}, + "down": {"uv": [10, 0, 13, 3], "texture": "#9"} + } + }, + { + "from": [6.5, 9, 5], + "to": [9.5, 15, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 9, 5]}, + "faces": { + "north": {"uv": [0, 3, 1.5, 6], "texture": "#12"}, + "east": {"uv": [0, 0, 3, 3], "texture": "#12"}, + "south": {"uv": [2.5, 3, 4, 6], "texture": "#12"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#12"}, + "up": {"uv": [1.5, 3, 3, 6], "texture": "#12"}, + "down": {"uv": [4.5, 3, 6, 6], "texture": "#12"} + } + }, + { + "from": [5.5, 10.5, 6.5], + "to": [10.5, 13.5, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "east": {"uv": [3, 6, 4.5, 7.5], "texture": "#12"}, + "south": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "west": {"uv": [4.5, 6, 6, 7.5], "texture": "#12"}, + "up": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"}, + "down": {"uv": [0, 6, 2.5, 7.5], "texture": "#12"} + } + }, + { + "from": [6, 8, 7], + "to": [7, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 8, 7]}, + "faces": { + "north": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "east": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "south": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "west": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "up": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"}, + "down": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"} + } + }, + { + "from": [9, 8, 7], + "to": [10, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]}, + "faces": { + "north": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "east": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "south": {"uv": [0, 7.5, 0.5, 9], "texture": "#12"}, + "west": {"uv": [0, 7.5, 1, 9], "texture": "#12"}, + "up": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"}, + "down": {"uv": [1, 7.5, 1.5, 8.5], "texture": "#12"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "jewelry", + "origin": [8, 8, 8], + "color": 0, + "children": [12, 13, 14, 15, 16, 17] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone.json index 7209926..4c624a6 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone.json @@ -56,16 +56,16 @@ }, { "name": "output", - "from": [6, 16, 6], - "to": [10, 16, 10], - "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, - "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + "from": [6, 10.5, 0.1], + "to": [10, 14.5, 0.1], + "rotation": {"angle": 45, "axis": "z", "origin": [8, 12.5, 0]}, + "faces": { + "north": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "rotation": 90, "texture": "#4"}, + "south": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "rotation": 270, "texture": "#4"}, + "up": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "down": {"uv": [0, 1, 2, 1], "rotation": 180, "texture": "#4"} } }, { diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_down.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_down.json new file mode 100644 index 0000000..4841d6d --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_down.json @@ -0,0 +1,246 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base", + "3": "anvilcraft_pigsplus:block/auto_royal_grindstone_stone", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "particle": "anvilcraft_pigsplus:block/auto_machine_base" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 0, 6], + "to": [10, 1, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 0.5, 8]}, + "faces": { + "north": {"uv": [0, 10, 4, 11], "rotation": 180, "texture": "#8"}, + "east": {"uv": [4, 10, 8, 11], "rotation": 180, "texture": "#8"}, + "south": {"uv": [0, 12, 4, 13], "rotation": 180, "texture": "#8"}, + "west": {"uv": [4, 12, 8, 13], "rotation": 180, "texture": "#8"}, + "up": {"uv": [12, 0, 16, 4], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 4, 16, 8], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [5.5, 9, 5], + "to": [10.5, 15, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 1, 10]}, + "faces": { + "north": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "east": {"uv": [5, 0, 11, 6], "texture": "#3"}, + "south": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "west": {"uv": [5, 0, 11, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "down": {"uv": [0, 0, 5, 6], "texture": "#3"} + } + }, + { + "from": [4, 10.5, 6.5], + "to": [12, 13.5, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "east": {"uv": [8, 6, 11, 9], "texture": "#3"}, + "south": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "west": {"uv": [8, 6, 11, 9], "texture": "#3"}, + "up": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "down": {"uv": [0, 6, 8, 9], "texture": "#3"} + } + }, + { + "from": [4.5, 8, 7], + "to": [5.5, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 8, 7]}, + "faces": { + "north": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "east": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "south": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "west": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "up": {"uv": [3, 9, 5, 10], "texture": "#3"}, + "down": {"uv": [3, 9, 5, 10], "texture": "#3"} + } + }, + { + "from": [10.5, 8, 7], + "to": [11.5, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 8, 7]}, + "faces": { + "north": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "east": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "south": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "west": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "up": {"uv": [3, 9, 5, 10], "texture": "#3"}, + "down": {"uv": [3, 9, 5, 10], "texture": "#3"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "grindstone", + "origin": [0, 0, 0], + "color": 0, + "children": [12, 13, 14, 15] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_down_overload.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_down_overload.json new file mode 100644 index 0000000..c4960dc --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_down_overload.json @@ -0,0 +1,246 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base_overload", + "3": "anvilcraft_pigsplus:block/auto_royal_grindstone_stone", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "particle": "anvilcraft_pigsplus:block/auto_machine_base_overload" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 0, 6], + "to": [10, 1, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 0.5, 8]}, + "faces": { + "north": {"uv": [0, 10, 4, 11], "rotation": 180, "texture": "#8"}, + "east": {"uv": [4, 10, 8, 11], "rotation": 180, "texture": "#8"}, + "south": {"uv": [0, 12, 4, 13], "rotation": 180, "texture": "#8"}, + "west": {"uv": [4, 12, 8, 13], "rotation": 180, "texture": "#8"}, + "up": {"uv": [12, 0, 16, 4], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 4, 16, 8], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [5.5, 9, 5], + "to": [10.5, 15, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 1, 10]}, + "faces": { + "north": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "east": {"uv": [5, 0, 11, 6], "texture": "#3"}, + "south": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "west": {"uv": [5, 0, 11, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "down": {"uv": [0, 0, 5, 6], "texture": "#3"} + } + }, + { + "from": [4, 10.5, 6.5], + "to": [12, 13.5, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "east": {"uv": [8, 6, 11, 9], "texture": "#3"}, + "south": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "west": {"uv": [8, 6, 11, 9], "texture": "#3"}, + "up": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "down": {"uv": [0, 6, 8, 9], "texture": "#3"} + } + }, + { + "from": [4.5, 8, 7], + "to": [5.5, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 8, 7]}, + "faces": { + "north": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "east": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "south": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "west": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "up": {"uv": [3, 9, 5, 10], "texture": "#3"}, + "down": {"uv": [3, 9, 5, 10], "texture": "#3"} + } + }, + { + "from": [10.5, 8, 7], + "to": [11.5, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 8, 7]}, + "faces": { + "north": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "east": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "south": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "west": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "up": {"uv": [3, 9, 5, 10], "texture": "#3"}, + "down": {"uv": [3, 9, 5, 10], "texture": "#3"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "grindstone", + "origin": [0, 0, 0], + "color": 0, + "children": [12, 13, 14, 15] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_overload.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_overload.json index 7908564..9848cdf 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_overload.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_overload.json @@ -56,16 +56,16 @@ }, { "name": "output", - "from": [6, 16, 6], - "to": [10, 16, 10], - "rotation": {"angle": 45, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "up": {"uv": [11, 5, 13, 7], "rotation": 180, "texture": "#4"}, - "down": {"uv": [11, 5, 13, 7], "rotation": 180, "texture": "#4"} + "from": [6, 10.5, 0.1], + "to": [10, 14.5, 0.1], + "rotation": {"angle": 45, "axis": "z", "origin": [8, 12.5, 0]}, + "faces": { + "north": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "rotation": 90, "texture": "#4"}, + "south": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "rotation": 270, "texture": "#4"}, + "up": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "down": {"uv": [0, 1, 2, 1], "rotation": 180, "texture": "#4"} } }, { diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_up.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_up.json new file mode 100644 index 0000000..7209926 --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_up.json @@ -0,0 +1,246 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base", + "3": "anvilcraft_pigsplus:block/auto_royal_grindstone_stone", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "particle": "anvilcraft_pigsplus:block/auto_machine_base" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 16, 6], + "to": [10, 16, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, + "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [5.5, 9, 5], + "to": [10.5, 15, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 1, 10]}, + "faces": { + "north": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "east": {"uv": [5, 0, 11, 6], "texture": "#3"}, + "south": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "west": {"uv": [5, 0, 11, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "down": {"uv": [0, 0, 5, 6], "texture": "#3"} + } + }, + { + "from": [4, 10.5, 6.5], + "to": [12, 13.5, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "east": {"uv": [8, 6, 11, 9], "texture": "#3"}, + "south": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "west": {"uv": [8, 6, 11, 9], "texture": "#3"}, + "up": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "down": {"uv": [0, 6, 8, 9], "texture": "#3"} + } + }, + { + "from": [4.5, 8, 7], + "to": [5.5, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 8, 7]}, + "faces": { + "north": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "east": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "south": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "west": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "up": {"uv": [3, 9, 5, 10], "texture": "#3"}, + "down": {"uv": [3, 9, 5, 10], "texture": "#3"} + } + }, + { + "from": [10.5, 8, 7], + "to": [11.5, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 8, 7]}, + "faces": { + "north": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "east": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "south": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "west": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "up": {"uv": [3, 9, 5, 10], "texture": "#3"}, + "down": {"uv": [3, 9, 5, 10], "texture": "#3"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "grindstone", + "origin": [0, 0, 0], + "color": 0, + "children": [12, 13, 14, 15] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_up_overload.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_up_overload.json new file mode 100644 index 0000000..7908564 --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_grindstone_up_overload.json @@ -0,0 +1,246 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base_overload", + "3": "anvilcraft_pigsplus:block/auto_royal_grindstone_stone", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "particle": "anvilcraft_pigsplus:block/auto_machine_base_overload" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 16, 6], + "to": [10, 16, 10], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "up": {"uv": [11, 5, 13, 7], "rotation": 180, "texture": "#4"}, + "down": {"uv": [11, 5, 13, 7], "rotation": 180, "texture": "#4"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [5.5, 9, 5], + "to": [10.5, 15, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 1, 10]}, + "faces": { + "north": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "east": {"uv": [5, 0, 11, 6], "texture": "#3"}, + "south": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "west": {"uv": [5, 0, 11, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 5, 6], "texture": "#3"}, + "down": {"uv": [0, 0, 5, 6], "texture": "#3"} + } + }, + { + "from": [4, 10.5, 6.5], + "to": [12, 13.5, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "east": {"uv": [8, 6, 11, 9], "texture": "#3"}, + "south": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "west": {"uv": [8, 6, 11, 9], "texture": "#3"}, + "up": {"uv": [0, 6, 8, 9], "texture": "#3"}, + "down": {"uv": [0, 6, 8, 9], "texture": "#3"} + } + }, + { + "from": [4.5, 8, 7], + "to": [5.5, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 8, 7]}, + "faces": { + "north": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "east": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "south": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "west": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "up": {"uv": [3, 9, 5, 10], "texture": "#3"}, + "down": {"uv": [3, 9, 5, 10], "texture": "#3"} + } + }, + { + "from": [10.5, 8, 7], + "to": [11.5, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 8, 7]}, + "faces": { + "north": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "east": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "south": {"uv": [2, 9, 3, 12], "texture": "#3"}, + "west": {"uv": [0, 9, 2, 12], "texture": "#3"}, + "up": {"uv": [3, 9, 5, 10], "texture": "#3"}, + "down": {"uv": [3, 9, 5, 10], "texture": "#3"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "grindstone", + "origin": [0, 0, 0], + "color": 0, + "children": [12, 13, 14, 15] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table.json index 4e88408..42e66f1 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table.json @@ -56,16 +56,16 @@ }, { "name": "output", - "from": [6, 16, 6], - "to": [10, 16, 10], - "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, + "from": [6, 10.5, 0.1], + "to": [10, 14.5, 0.1], + "rotation": {"angle": 45, "axis": "z", "origin": [8, 12.5, 0]}, "faces": { - "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, - "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + "north": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "rotation": 90, "texture": "#4"}, + "south": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "rotation": 270, "texture": "#4"}, + "up": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "down": {"uv": [0, 1, 2, 1], "rotation": 180, "texture": "#4"} } }, { diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_down.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_down.json new file mode 100644 index 0000000..c3e705a --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_down.json @@ -0,0 +1,202 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base", + "3": "anvilcraft_pigsplus:block/auto_royal_smithing_table_core", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "particle": "anvilcraft_pigsplus:block/auto_machine_base" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 0, 6], + "to": [10, 1, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 0.5, 8]}, + "faces": { + "north": {"uv": [0, 10, 4, 11], "rotation": 180, "texture": "#8"}, + "east": {"uv": [4, 10, 8, 11], "rotation": 180, "texture": "#8"}, + "south": {"uv": [0, 12, 4, 13], "rotation": 180, "texture": "#8"}, + "west": {"uv": [4, 12, 8, 13], "rotation": 180, "texture": "#8"}, + "up": {"uv": [12, 0, 16, 4], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 4, 16, 8], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [4, 7, 4], + "to": [12, 15, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 11, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#3"}, + "down": {"uv": [0, 8, 8, 16], "texture": "#3"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + 12 + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_down_overload.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_down_overload.json new file mode 100644 index 0000000..7bc86a9 --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_down_overload.json @@ -0,0 +1,202 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base_overload", + "3": "anvilcraft_pigsplus:block/auto_royal_smithing_table_core", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "particle": "anvilcraft_pigsplus:block/auto_machine_base_overload" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 0, 6], + "to": [10, 1, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 0.5, 8]}, + "faces": { + "north": {"uv": [0, 10, 4, 11], "rotation": 180, "texture": "#8"}, + "east": {"uv": [4, 10, 8, 11], "rotation": 180, "texture": "#8"}, + "south": {"uv": [0, 12, 4, 13], "rotation": 180, "texture": "#8"}, + "west": {"uv": [4, 12, 8, 13], "rotation": 180, "texture": "#8"}, + "up": {"uv": [12, 0, 16, 4], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 4, 16, 8], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [4, 7, 4], + "to": [12, 15, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 11, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#3"}, + "down": {"uv": [0, 8, 8, 16], "texture": "#3"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + 12 + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_overload.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_overload.json index 275914c..26bf55f 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_overload.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_overload.json @@ -56,16 +56,16 @@ }, { "name": "output", - "from": [6, 16, 6], - "to": [10, 16, 10], - "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, + "from": [6, 10.5, 0.1], + "to": [10, 14.5, 0.1], + "rotation": {"angle": 45, "axis": "z", "origin": [8, 12.5, 0]}, "faces": { - "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, - "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, - "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + "north": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "rotation": 90, "texture": "#4"}, + "south": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "rotation": 270, "texture": "#4"}, + "up": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "down": {"uv": [0, 1, 2, 1], "rotation": 180, "texture": "#4"} } }, { diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_up.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_up.json new file mode 100644 index 0000000..4e88408 --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_up.json @@ -0,0 +1,202 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base", + "3": "anvilcraft_pigsplus:block/auto_royal_smithing_table_core", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "particle": "anvilcraft_pigsplus:block/auto_machine_base" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 16, 6], + "to": [10, 16, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, + "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [4, 7, 4], + "to": [12, 15, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 11, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#3"}, + "down": {"uv": [0, 8, 8, 16], "texture": "#3"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + 12 + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_up_overload.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_up_overload.json new file mode 100644 index 0000000..275914c --- /dev/null +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_royal_smithing_table_up_overload.json @@ -0,0 +1,202 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "minecraft:block/cube", + "render_type": "minecraft:cutout", + "texture_size": [32, 32], + "textures": { + "2": "anvilcraft_pigsplus:block/auto_machine_base_overload", + "3": "anvilcraft_pigsplus:block/auto_royal_smithing_table_core", + "4": "anvilcraft_pigsplus:block/auto_machine_glass", + "8": "anvilcraft_pigsplus:block/auto_machine_frame", + "particle": "anvilcraft_pigsplus:block/auto_machine_base_overload" + }, + "elements": [ + { + "name": "base", + "from": [1, 1, 1], + "to": [15, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 8]}, + "faces": { + "north": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "east": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "south": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "west": {"uv": [0, 10.5, 6, 14], "texture": "#2"}, + "up": {"uv": [16, 7, 9, 0], "texture": "#2"}, + "down": {"uv": [7, 0, 0, 7], "texture": "#2"} + } + }, + { + "name": "glass", + "from": [0, 9, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 9, 0]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 8, 0, 0], "texture": "#4"}, + "down": {"uv": [8, 8, 0, 16], "texture": "#4"} + } + }, + { + "name": "glass", + "from": [0.01, 15.995, 0.01], + "to": [15.99, 9.005, 15.99], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "east": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "south": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "west": {"uv": [8, 0, 16, 3.5], "texture": "#4"}, + "up": {"uv": [8, 16, 0, 8], "texture": "#4"}, + "down": {"uv": [8, 0, 0, 8], "texture": "#4"} + } + }, + { + "name": "output", + "from": [6, 16, 6], + "to": [10, 16, 10], + "rotation": {"angle": -45, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "east": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "south": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "west": {"uv": [0, 1, 2, 1], "texture": "#4"}, + "up": {"uv": [11, 5, 13, 7], "rotation": 90, "texture": "#4"}, + "down": {"uv": [11, 5, 13, 7], "rotation": 270, "texture": "#4"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "east": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "texture": "#8"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 90, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [0, 0, 13], + "to": [3, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "west": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 180, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 0, 0], + "to": [3, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 9], "texture": "#8"}, + "west": {"uv": [6, 0, 9, 9], "texture": "#8"}, + "up": {"uv": [12, 3, 9, 0], "rotation": 270, "texture": "#8"}, + "down": {"uv": [12, 3, 9, 6], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [3, 6, 0], + "to": [13, 9, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "texture": "#8"} + } + }, + { + "from": [13, 6, 3], + "to": [16, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 90, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 270, "texture": "#8"} + } + }, + { + "from": [3, 6, 13], + "to": [13, 9, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "east": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "south": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "west": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 180, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 180, "texture": "#8"} + } + }, + { + "from": [0, 6, 3], + "to": [3, 9, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "east": {"uv": [0, 13, 10, 16], "texture": "#8"}, + "south": {"uv": [3, 0, 6, 3], "texture": "#8"}, + "west": {"uv": [0, 10, 10, 13], "texture": "#8"}, + "up": {"uv": [0, 13, 10, 16], "rotation": 270, "texture": "#8"}, + "down": {"uv": [0, 10, 10, 13], "rotation": 90, "texture": "#8"} + } + }, + { + "from": [4, 7, 4], + "to": [12, 15, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 11, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#3"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#3"}, + "down": {"uv": [0, 8, 8, 16], "texture": "#3"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "frame", + "origin": [8, 8, 8], + "color": 0, + "children": [4, 5, 6, 7, 8, 9, 10, 11] + }, + 12 + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_machine_frame.png b/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_machine_frame.png index 200e91fa3beeed34dd924226c9d9100309694323..c5ed0fdd97751c4eacbdb279e20aa27f9dd2bb2e 100644 GIT binary patch delta 326 zcmV-M0lEIj0^kCWBYy!ENklZ3kXOv|bY9e4`@hN&#EeLyrNPigsj&TvfHii4@b{o zIPnrf?6U>B8=$fI2aJi6cI1-e4zv%06HFkJ2E78YwXe4WJ&B>pfb4?_#&+U<5IJD# z1;B4wm)J?bhCeAuMvbY%0AY`qlTyWhNFaQ7m07*qoM6N<$f&-_E8vp}c8BYyz>NklXfI z>Y>T=nO2Iz>TVl9j&DtYgr|B|s^D_HP@d(T1`37f9#;ieCx40}b6Mt@M{@5@0HrL? z8&z8j2L6C-_`Dyl;EIb^VQpYmfD#m4v3wot3IGMJxDT@ezeHc`!lOS?aGY)YcJ9z} zVAFt|7SP9K9Lt<@0_jAXGDwA)It|9*gfdZ}>klBWf4qWHT2T;;zFY?b;U8yamFm2A z1*ou^RFydwZzli%0RR6YL6xrn000I_L_t&o0J7qmM!#-vga7~l07*qoM6N<$g2;`B Al>h($ From 4f5f81560db7ad6f27cf20f58231d268c1786024 Mon Sep 17 00:00:00 2001 From: TBPig <147127248+TBPig@users.noreply.github.com> Date: Sun, 1 Feb 2026 21:11:36 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8F=AE=E7=A0=A7?= =?UTF-8?q?=E9=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pigsplus/block/AutoChickenBlock.java | 30 +++++ .../blockstates/auto_chicken.json | 14 +- .../models/block/auto_chicken.json | 125 ++++++++++++++++-- .../textures/block/auto_chicken_core.png | Bin 234 -> 654 bytes .../textures/block/auto_chicken_pillar.png | Bin 142 -> 401 bytes .../textures/block/auto_chicken_side.png | Bin 111 -> 358 bytes 6 files changed, 155 insertions(+), 14 deletions(-) diff --git a/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java b/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java index 584d59e..58b1e71 100644 --- a/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java +++ b/src/main/java/dev/anvilcraft/pigsplus/block/AutoChickenBlock.java @@ -2,21 +2,29 @@ import dev.dubhe.anvilcraft.api.hammer.IHammerRemovable; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; import net.minecraft.util.RandomSource; import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; public class AutoChickenBlock extends Block implements IHammerRemovable { + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; public static VoxelShape SHAPE = Shapes.or( Block.box(0, 14, 0, 16, 16, 16), @@ -26,6 +34,19 @@ public class AutoChickenBlock extends Block implements IHammerRemovable { public AutoChickenBlock(Properties properties) { super(properties); + this.registerDefaultState(this.stateDefinition + .any() + .setValue(FACING, Direction.NORTH)); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(FACING); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()); } @Override @@ -69,5 +90,14 @@ public void spawnEgg(ServerLevel level, BlockPos pos, float fallDistance) { level.random.nextDouble() * 0.2 - 0.1 ) ); + // 产生鸡下蛋的声音 + level.playSound( + null, + pos, + SoundEvents.CHICKEN_EGG, + SoundSource.BLOCKS, + 0.7F, + level.random.nextFloat() * 0.2F + 0.9F + ); } } diff --git a/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_chicken.json b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_chicken.json index fd89182..67b47bc 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_chicken.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/blockstates/auto_chicken.json @@ -1,7 +1,19 @@ { "variants": { - "": { + "facing=south": { "model": "anvilcraft_pigsplus:block/auto_chicken" + }, + "facing=west": { + "model": "anvilcraft_pigsplus:block/auto_chicken", + "y": 90 + }, + "facing=north": { + "model": "anvilcraft_pigsplus:block/auto_chicken", + "y": 180 + }, + "facing=east": { + "model": "anvilcraft_pigsplus:block/auto_chicken", + "y": 270 } } } \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json index 8290554..4c59ad2 100644 --- a/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json +++ b/src/main/resources/assets/anvilcraft_pigsplus/models/block/auto_chicken.json @@ -50,8 +50,8 @@ } }, { - "from": [6, 8, 9], - "to": [10, 13, 12], + "from": [6, 8, 8.5], + "to": [10, 13, 11.5], "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 11]}, "faces": { "north": {"uv": [5.5, 2.5, 7.5, 5], "texture": "#2"}, @@ -63,21 +63,34 @@ } }, { - "from": [5.5, 5, 4], - "to": [10.5, 10, 10], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "from": [5.5, 5, 2.5], + "to": [10.5, 10, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]}, "faces": { "north": {"uv": [0, 5, 2.5, 7.5], "texture": "#2"}, "east": {"uv": [0, 0, 3, 2.5], "texture": "#2"}, "south": {"uv": [5.5, 0, 8, 2.5], "texture": "#2"}, "west": {"uv": [0, 2.5, 3, 5], "texture": "#2"}, - "up": {"uv": [5.5, 3, 3, 0], "texture": "#2"}, - "down": {"uv": [5.5, 3, 3, 6], "texture": "#2"} + "up": {"uv": [14.5, 8, 12, 4.5], "texture": "#2"}, + "down": {"uv": [12, 4.5, 9.5, 8], "texture": "#2"} } }, { - "from": [6, 2, 7], - "to": [7, 5, 7], + "from": [6, 9, 11.5], + "to": [10, 11, 13.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 9, 12]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "texture": "#2"}, + "east": {"uv": [12, 1, 13, 2], "texture": "#2"}, + "south": {"uv": [10, 1, 12, 2], "texture": "#2"}, + "west": {"uv": [9, 1, 10, 2], "texture": "#2"}, + "up": {"uv": [10, 0, 12, 1], "texture": "#2"}, + "down": {"uv": [12, 0, 14, 1], "texture": "#2"} + } + }, + { + "from": [6, 2, 6.5], + "to": [7, 5, 6.5], "rotation": {"angle": 0, "axis": "y", "origin": [6, 2, 7]}, "faces": { "north": {"uv": [2, 7.5, 2.5, 9], "texture": "#2"}, @@ -89,8 +102,8 @@ } }, { - "from": [9, 2, 7], - "to": [10, 5, 7], + "from": [9, 2, 6.5], + "to": [10, 5, 6.5], "rotation": {"angle": 0, "axis": "y", "origin": [9, 2, 7]}, "faces": { "north": {"uv": [5.5, 7.5, 6, 9], "texture": "#2"}, @@ -100,6 +113,84 @@ "up": {"uv": [0.5, 0, 0, 0], "texture": "#2"}, "down": {"uv": [0.5, 0, 0, 0], "texture": "#2"} } + }, + { + "from": [5, 2.025, 6.5], + "to": [11, 2.025, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 2, 7]}, + "faces": { + "north": {"uv": [0, 1, 3, 1], "texture": "#2"}, + "east": {"uv": [0, 1, 1, 1], "texture": "#2"}, + "south": {"uv": [0, 1, 3, 1], "texture": "#2"}, + "west": {"uv": [0, 1, 1, 1], "texture": "#2"}, + "up": {"uv": [10.5, 3, 13.5, 4.5], "texture": "#2"}, + "down": {"uv": [10.5, 4.5, 13.5, 3], "texture": "#2"} + } + }, + { + "from": [4.5, 6, 3.5], + "to": [11.5, 10, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 6, 6]}, + "faces": { + "north": {"uv": [2.5, 10.5005, 6, 12.5], "texture": "#2"}, + "east": {"uv": [0, 10.5005, 2.5, 12.5], "texture": "#2"}, + "south": {"uv": [6, 10.5005, 2.5, 12.5], "texture": "#2"}, + "west": {"uv": [2.5, 10.5005, 0, 12.5], "texture": "#2"}, + "up": {"uv": [2.5, 10.5, 6, 13], "texture": "#2"}, + "down": {"uv": [2.5, 13, 6, 10.5], "texture": "#2"} + } + }, + { + "from": [1, 2, 1], + "to": [3, 14, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [14, 0, 16, 12], "texture": "#1"}, + "east": {"uv": [16, 0, 14, 12], "texture": "#1"}, + "south": {"uv": [14, 0, 16, 12], "texture": "#1"}, + "west": {"uv": [16, 0, 14, 12], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#1"} + } + }, + { + "from": [1, 2, 13], + "to": [3, 14, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 13]}, + "faces": { + "north": {"uv": [16, 0, 14, 12], "texture": "#1"}, + "east": {"uv": [14, 0, 16, 12], "texture": "#1"}, + "south": {"uv": [16, 0, 14, 12], "texture": "#1"}, + "west": {"uv": [14, 0, 16, 12], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#1"} + } + }, + { + "from": [13, 2, 13], + "to": [15, 14, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 2, 13]}, + "faces": { + "north": {"uv": [14, 0, 16, 12], "texture": "#1"}, + "east": {"uv": [16, 0, 14, 12], "texture": "#1"}, + "south": {"uv": [14, 0, 16, 12], "texture": "#1"}, + "west": {"uv": [16, 0, 14, 12], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#1"} + } + }, + { + "from": [13, 2, 1], + "to": [15, 14, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 2, 1]}, + "faces": { + "north": {"uv": [16, 0, 14, 12], "texture": "#1"}, + "east": {"uv": [14, 0, 16, 12], "texture": "#1"}, + "south": {"uv": [16, 0, 14, 12], "texture": "#1"}, + "west": {"uv": [14, 0, 16, 12], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#1"} + } } ], "groups": [ @@ -113,13 +204,21 @@ "children": [ 3, 4, + 5, { "name": "foot", "origin": [8, 8, 8], "color": 0, - "children": [5, 6] - } + "children": [6, 7, 8] + }, + 9 ] + }, + { + "name": "group", + "origin": [8, 8, 8], + "color": 0, + "children": [10, 11, 12, 13] } ] } \ No newline at end of file diff --git a/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_core.png b/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_core.png index a2b7d49c128ed259c2ecd486804e2d6e5d4a3cfb..81c849ac916c355647ef1315c16591485ac18775 100644 GIT binary patch delta 630 zcmV-+0*U?V0geTbBYy%zNkl7vm zI)cz>G(@dd%L#^dyB!q@h1j;$Y6;)>6L#lE8&RpWp!?0{lYh8vKrz5DB!N=Q#s&*c3y+shQb0F!jr;mpLZ^6a5q+lG87H!shfj z%!_&dO}BvAw-U&bh!h;{J9COcWj;^Nb#0e6J@sBhym(0@AjwEXip65i6`WewF8ZG$ zjU*?GmM=C>PR;V_f?}?n;8GdiBP-^jMsPp2v6uh?<9|4rD~lXZ62}wKpJxit$uOV! zSPuc*sJfXGIc#ID#B$}7Z9I{LY1=?!6}1gOBMimz&PC1@gjY?M3KG@LG-zJ0iwW<{ znn)k_TS7(r4*El6P`Fgl3eYzmEo8;?ebeR#Jz>P+zdW zgcKvj$ZrYc!!SgFp+XbUv(4Bw{u@XfFG@gaUFA6If5Sio_=kwfu?< QOaK4?07*qoM6N<$g6&ov&;S4c delta 207 zcmeBUeZ@FIxt?LZr;B4q#hf=&efb;=1l-u~Mhb{;P%h+5FXt4p7N20jsH-UYcG28R zUeDhC+FUWS?sB3wyMT*~!+`_FDj(_@EsvNrE>Z7bJZNNAebfIylYw@_-@6x>tWxyD z`@9(M)=bzwQTfRs4d&wbd)GL<8NE}ic%Ofppt0+uXP6w*qOBgAR)xojrB~Wo@Mi4D zUBMLhU~}Dd$HN^g9t|M0hdYOXf#LuE%LW{oKn5Ggt;`I1o7HPJJ*R-b~f9zX%Bs{+1c6I_hx1{iZtG@&(1M>m4MPg zA10;4gu?oMW@{hzwvH|@$l$bfFxvLlNXfxo+$OP$J|K#68-KvzYUpJIQ0OPQvbW)9 zBxZ)M2pq0$u4e>5quF921Y-zc;0Kmy7L+I;MFaz=9mA_1QySluW?>09SgW|oK&`UF zB#gK{Cj--E9u84B_@G6wJwV4r9sNL7?0bCR(%j6Z2<+8K_f6WN6Da*D%|M8huKREJ zYJFwOQv|q$MsPEre^a+SBKLY-bbDz|Ai?g-D=HV)pUDr;E3_mOEeZ8FAV?y002ovPDHLkV1iiOtz!TH delta 114 zcmbQp+{ZXUIh(=R)5S5QV$PfMhP(_4JT4cNSMu>FurpgIS|lbp^BG-W$iDt;8eeVn z^!fAV+_mEIn(KU@DTqbsf${{0N9uQ`%5!{SmuF!3|6h}n6-YC%fsA8jIIY6=&a$ax Q4N!!^)78&qol`;+0E6QtGXMYp diff --git a/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_side.png b/src/main/resources/assets/anvilcraft_pigsplus/textures/block/auto_chicken_side.png index 2d6e9600d139fde67358c733295b0bfcd6fade53..3cd342d8c489133a0386b9e1df44aa6f773f91bf 100644 GIT binary patch delta 331 zcmV-R0kr;a<^qr-e*qgwL_t(|oQ#saY64LZg*VG(2}EKH0Ru^hAc!bft&NSXy^UZa zzJi5M;VX!xg%4n3VXd7Y7J>>23jU)YR-W~&x43r|hy9tI`G!4rX2htGH?H>a|4ZjJ z7&UHoS`6rHCsR5CcfY&FbKjc3`z<*BFBjS^&rW=Io^Oude}Ok-WA>-XTq>LR3;V9L zrPGB{npxP(rc-WKyNLFNt70yu(EOCycslAx!oP4O?ch(yHya-mT4ot{B|(Wo^E|gx zS&Tac=!qvSYb1>bV8J>?i6_m7srN)zB58LHdcQqsc3g0lPtt%*srxaFuDD&|D^s-P zq;(qel3g*mMOC#*yISwxQ^G7)Q0TK%Xjmi^z(wUw0d~-Mdc7|I009607tF8;00006 dNklmdKI;Vst0H5?5z5oCK