From d70307b5c921dcf6214bfef4393169b4a1b2caad Mon Sep 17 00:00:00 2001 From: quat1024 Date: Tue, 11 Jul 2023 04:31:25 -0400 Subject: [PATCH] Errata --- .../github/cottonmc/templates/Templates.java | 4 +++- .../templates/block/TemplateStairsBlock.java | 1 + .../minecraft/tags/blocks/mineable/axe.json | 6 ++++-- .../recipes/decorations/templates.json | 6 ++++-- .../templates/loot_tables/blocks/button.json | 19 +++++++++++++++++++ 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/data/templates/loot_tables/blocks/button.json diff --git a/src/main/java/io/github/cottonmc/templates/Templates.java b/src/main/java/io/github/cottonmc/templates/Templates.java index 221defa..46f4f13 100644 --- a/src/main/java/io/github/cottonmc/templates/Templates.java +++ b/src/main/java/io/github/cottonmc/templates/Templates.java @@ -59,7 +59,7 @@ public class Templates implements ModInitializer { public static final Block SLAB = Registry.register(Registries.BLOCK, id("slab") , new TemplateSlabBlock(cp(Blocks.OAK_SLAB))); public static final Block STAIRS = Registry.register(Registries.BLOCK, id("stairs") , new TemplateStairsBlock(cp(Blocks.OAK_STAIRS))); public static final Block TRAPDOOR = Registry.register(Registries.BLOCK, id("trapdoor") , new TemplateTrapdoorBlock(cp(Blocks.OAK_TRAPDOOR))); - public static final Block WALL = Registry.register(Registries.BLOCK, id("wall") , new TemplateWallBlock(cp(Blocks.COBBLESTONE_WALL))); + public static final Block WALL = Registry.register(Registries.BLOCK, id("wall") , new TemplateWallBlock(TemplateInteractionUtil.makeSettings())); public static final Block SLOPE = Registry.register(Registries.BLOCK, id("slope") , new TemplateSlopeBlock(TemplateInteractionUtil.makeSettings())); //30 degree slope (shallow/deep) //corner slopes @@ -146,5 +146,7 @@ public class Templates implements ModInitializer { e.add(CARPET); e.add(PANE); e.add(CANDLE); + + e.add(SLOPE); } } diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateStairsBlock.java b/src/main/java/io/github/cottonmc/templates/block/TemplateStairsBlock.java index 91541c6..9044137 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateStairsBlock.java +++ b/src/main/java/io/github/cottonmc/templates/block/TemplateStairsBlock.java @@ -27,6 +27,7 @@ import org.jetbrains.annotations.Nullable; public class TemplateStairsBlock extends StairsBlock implements BlockEntityProvider { public TemplateStairsBlock(BlockState blockState, Settings settings) { super(blockState, settings); + setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState())); } public TemplateStairsBlock(Settings settings) { diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json index c88eb91..d476aea 100644 --- a/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -7,12 +7,14 @@ "templates:cube", "templates:fence", "templates:fence_gate", + "templates:lever", "templates:pane", "templates:post", + "templates:pressure_plate", "templates:slab", - "templates:slope", "templates:stairs", "templates:trapdoor", - "templates:wall" + "templates:wall", + "templates:slope" ] } \ No newline at end of file diff --git a/src/main/resources/data/templates/advancements/recipes/decorations/templates.json b/src/main/resources/data/templates/advancements/recipes/decorations/templates.json index 72621e6..ea588a1 100644 --- a/src/main/resources/data/templates/advancements/recipes/decorations/templates.json +++ b/src/main/resources/data/templates/advancements/recipes/decorations/templates.json @@ -8,13 +8,15 @@ "templates:cube", "templates:fence", "templates:fence_gate", + "templates:lever", "templates:pane", "templates:post", + "templates:pressure_plate", "templates:slab", - "templates:slope", "templates:stairs", "templates:trapdoor", - "templates:wall" + "templates:wall", + "templates:slope" ] }, "criteria": { diff --git a/src/main/resources/data/templates/loot_tables/blocks/button.json b/src/main/resources/data/templates/loot_tables/blocks/button.json new file mode 100644 index 0000000..e8b322a --- /dev/null +++ b/src/main/resources/data/templates/loot_tables/blocks/button.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "templates:button" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file