diff --git a/src/main/java/minescript/block/ModBlocks.java b/src/main/java/minescript/block/ModBlocks.java index b9775e6..be21cbd 100644 --- a/src/main/java/minescript/block/ModBlocks.java +++ b/src/main/java/minescript/block/ModBlocks.java @@ -14,7 +14,7 @@ import net.minecraft.util.Identifier; public class ModBlocks { - public static final Block TURTLE_BLOCK = registerBlock("turtle_block", new TurtleBlock(FabricBlockSettings.copyOf(Blocks.MANGROVE_WOOD))); + public static final Block TURTLE_BLOCK = registerBlock("turtle_block", new TurtleBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).strength(5.0f).requiresTool())); private static Block registerBlockWithoutBlockItem(String name, Block block){ return Registry.register(Registries.BLOCK, new Identifier(MineScript.MOD_ID, name), block); diff --git a/src/main/java/minescript/network/TurtleCommands.java b/src/main/java/minescript/network/TurtleCommands.java index 0fe72ed..425bdae 100644 --- a/src/main/java/minescript/network/TurtleCommands.java +++ b/src/main/java/minescript/network/TurtleCommands.java @@ -43,6 +43,7 @@ public static CompletableFuture step(MinecraftServer server, ServerWor } } + // world.breakBlock(entity.turtlePos, true); world.setBlockState(entity.turtlePos, state, Block.NOTIFY_ALL); world.setBlockState(oldPos, placingBlock.getDefaultState(), Block.NOTIFY_ALL); diff --git a/src/main/resources/data/loot_tables/blocks/turtle_block.json b/src/main/resources/data/loot_tables/blocks/turtle_block.json new file mode 100644 index 0000000..e69de29 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..e477bb1 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "minescript:turtle_block" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/needs_stone_tool.json b/src/main/resources/data/minecraft/tags/blocks/needs_stone_tool.json new file mode 100644 index 0000000..e477bb1 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/needs_stone_tool.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "minescript:turtle_block" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minescript/loot_tables/blocks/turtle_block.json b/src/main/resources/data/minescript/loot_tables/blocks/turtle_block.json new file mode 100644 index 0000000..a2c5665 --- /dev/null +++ b/src/main/resources/data/minescript/loot_tables/blocks/turtle_block.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minescript:turtle_block" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file