From 260d3ec1a92252b12b94f0f25dd526808c4aa9f0 Mon Sep 17 00:00:00 2001 From: Jkibbels Date: Sun, 1 Sep 2024 13:49:20 -0400 Subject: [PATCH] [5] one directory for you, and one for you, and one for... --- .../AttributeMgr/AttributeMgr.java | 1 - .../AttributeNodes/AttributeFlight.java | 12 ++++++++--- .../CustomBlocks/BlockManager.java | 11 +++++++++- .../java/jesse/keeblarcraft/Keeblarcraft.java | 1 - .../tags/blocks/needs_tool_level_4.json | 5 +++++ .../loot_tables/blocks/example_block.json | 20 ++++++++++++++++++ .../recipes/example_block_shaped_recipe.json | 21 +++++++++++++++++++ .../example_block_shapeless_recipe.json | 13 ++++++++++++ .../tags/blocks/mineable/pickaxe.json | 6 ++++++ .../tags/blocks/needs_diamond_tool.json | 6 ++++++ 10 files changed, 90 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/data/fabric/tags/blocks/needs_tool_level_4.json create mode 100644 src/main/resources/data/keeblarcraft/loot_tables/blocks/example_block.json create mode 100644 src/main/resources/data/keeblarcraft/recipes/example_block_shaped_recipe.json create mode 100644 src/main/resources/data/keeblarcraft/recipes/example_block_shapeless_recipe.json create mode 100644 src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json create mode 100644 src/main/resources/data/minecraft/tags/blocks/needs_diamond_tool.json diff --git a/src/main/java/jesse/keeblarcraft/AttributeMgr/AttributeMgr.java b/src/main/java/jesse/keeblarcraft/AttributeMgr/AttributeMgr.java index 908e2e8..aa0cb85 100644 --- a/src/main/java/jesse/keeblarcraft/AttributeMgr/AttributeMgr.java +++ b/src/main/java/jesse/keeblarcraft/AttributeMgr/AttributeMgr.java @@ -10,7 +10,6 @@ package jesse.keeblarcraft.AttributeMgr; import java.util.HashMap; -import java.util.List; import jesse.keeblarcraft.Keeblarcraft; import jesse.keeblarcraft.AttributeMgr.AttributeNodes.AbstractNode; diff --git a/src/main/java/jesse/keeblarcraft/AttributeMgr/AttributeNodes/AttributeFlight.java b/src/main/java/jesse/keeblarcraft/AttributeMgr/AttributeNodes/AttributeFlight.java index d4ab443..ebf01a7 100644 --- a/src/main/java/jesse/keeblarcraft/AttributeMgr/AttributeNodes/AttributeFlight.java +++ b/src/main/java/jesse/keeblarcraft/AttributeMgr/AttributeNodes/AttributeFlight.java @@ -1,14 +1,20 @@ +/* + * + * AttributeFlight + * + * The flight attribute + * + * +*/ + package jesse.keeblarcraft.AttributeMgr.AttributeNodes; import java.util.HashMap; import java.util.List; -import jesse.keeblarcraft.AttributeMgr.AttributeMgr; - public class AttributeFlight extends AbstractNode { public AttributeFlight() { - // AttributeMgr.RegisterAttributeClass(getClass()); } @Override diff --git a/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockManager.java b/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockManager.java index 7c83f31..4e037b9 100644 --- a/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockManager.java +++ b/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockManager.java @@ -1,3 +1,12 @@ +/* + * + * BlockManager + * + * The mod block manager + * + * +*/ + package jesse.keeblarcraft.CustomBlocks; import java.util.ArrayList; @@ -60,7 +69,7 @@ public class BlockManager { Keeblarcraft.LOGGER.info("Registering modded blocks for " + Keeblarcraft.MOD_ID); // Register example block to the mod - Block exampleBlock = new Block(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).sounds(BlockSoundGroup.AMETHYST_BLOCK)); + Block exampleBlock = new Block(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).sounds(BlockSoundGroup.AMETHYST_BLOCK).requiresTool().breakInstantly()); RegisterBlock("example_block", exampleBlock); } diff --git a/src/main/java/jesse/keeblarcraft/Keeblarcraft.java b/src/main/java/jesse/keeblarcraft/Keeblarcraft.java index b7446b5..d20f1ec 100644 --- a/src/main/java/jesse/keeblarcraft/Keeblarcraft.java +++ b/src/main/java/jesse/keeblarcraft/Keeblarcraft.java @@ -18,7 +18,6 @@ import org.slf4j.LoggerFactory; import jesse.keeblarcraft.AttributeMgr.AttributeMgr; import jesse.keeblarcraft.Commands.CustomCommandManager; import jesse.keeblarcraft.CustomBlocks.BlockManager; -import jesse.keeblarcraft.CustomItems.CustomItemGroups; import jesse.keeblarcraft.CustomItems.ItemManager; import jesse.keeblarcraft.Utils.CustomExceptions.SETUP_FAILED_EXCEPTION; import jesse.keeblarcraft.Utils.ChatUtil; diff --git a/src/main/resources/data/fabric/tags/blocks/needs_tool_level_4.json b/src/main/resources/data/fabric/tags/blocks/needs_tool_level_4.json new file mode 100644 index 0000000..a1dc310 --- /dev/null +++ b/src/main/resources/data/fabric/tags/blocks/needs_tool_level_4.json @@ -0,0 +1,5 @@ +{ + "replace": false, + "values": [ + ] +} \ No newline at end of file diff --git a/src/main/resources/data/keeblarcraft/loot_tables/blocks/example_block.json b/src/main/resources/data/keeblarcraft/loot_tables/blocks/example_block.json new file mode 100644 index 0000000..ae25ac9 --- /dev/null +++ b/src/main/resources/data/keeblarcraft/loot_tables/blocks/example_block.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "keeblarcraft:example_block" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/keeblarcraft/recipes/example_block_shaped_recipe.json b/src/main/resources/data/keeblarcraft/recipes/example_block_shaped_recipe.json new file mode 100644 index 0000000..1ef9b84 --- /dev/null +++ b/src/main/resources/data/keeblarcraft/recipes/example_block_shaped_recipe.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "#C#", + "###", + "#C#" + ], + "key": { + "#": { + "item": "keeblarcraft:example_block" + }, + "C": { + "item": "minecraft:coal" + } + }, + "result": { + "item": "keeblarcraft:example_block", + "count": 8 + } +} \ No newline at end of file diff --git a/src/main/resources/data/keeblarcraft/recipes/example_block_shapeless_recipe.json b/src/main/resources/data/keeblarcraft/recipes/example_block_shapeless_recipe.json new file mode 100644 index 0000000..379edbf --- /dev/null +++ b/src/main/resources/data/keeblarcraft/recipes/example_block_shapeless_recipe.json @@ -0,0 +1,13 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "ingredients": [ + { + "item": "keeblarcraft:example_block" + } + ], + "result": { + "item": "keeblarcraft:example_block", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json new file mode 100644 index 0000000..345906e --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "keeblarcraft:example_block" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/needs_diamond_tool.json b/src/main/resources/data/minecraft/tags/blocks/needs_diamond_tool.json new file mode 100644 index 0000000..345906e --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/needs_diamond_tool.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "keeblarcraft:example_block" + ] +} \ No newline at end of file