Posted May 19, 20223 yr Hello, I got a problem with the block strength public static final RegistryObject<Block> BASIC_MINER = registerBlock("basic_miner", () -> new BasicMiner(BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(5f)), CreativeModeTab.TAB_MISC); public static final RegistryObject<Block> ADVANCED_MINER = registerBlock("advanced_miner", () -> new AdvancedMiner(BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(5f)), CreativeModeTab.TAB_MISC); public static final RegistryObject<Block> ULTIMATE_MINER = registerBlock("ultimate_miner", () -> new UltimateMiner(BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(5f)), CreativeModeTab.TAB_MISC); private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block, CreativeModeTab tab) { RegistryObject<T> toReturn = BLOCKS.register(name, block); registerBlockItem(name, toReturn, tab); return toReturn; } private static <T extends Block> RegistryObject<Item> registerBlockItem(String name, RegistryObject<T> block, CreativeModeTab tab) { return ItemManager.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties().tab(tab))); } public BasicMiner(Properties properties) { super(properties); this.registerDefaultState(this.stateDefinition.any().setValue(ACTIVE, false)); } Here is how I instantiate my blocks, but it seems that the strength and the "requiresCorrectToolForDrops" are not considered, because when I try to break the block with a diamond pickaxe, it takes a lot of time (like you try to break a log with a pickaxe). Do you have an idea to solve this problem ?
May 19, 20223 yr 5 minutes ago, Sweetmimike said: Do you have an idea to solve this problem ? you need to add your Block to a minebale tag (axe, hoe, pickaxe or shovel) and a needs tool tag (needs_stone_tool, needs_iron_tool, needs_diamond_tool or one of the Forge ones)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.