Posted July 2, 20205 yr While I was creating a mod, I noticed that my mod's blocks harvest levels were all being set to zero, despite me defining them in the block's properties. So I did a clean install of the latest MDK (Forge 1.16.1-32.0.39), and made a quick test just to see if something else was causing it, but I haven't been able to figure out what's making this happen yet. Here's what the code from my testing looks like: @Mod("examplemod") public class ExampleMod { // Directly reference a log4j logger. private static final Logger LOGGER = LogManager.getLogger(); private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, "examplemod"); public static final RegistryObject<Block> HARD_BLOCK = BLOCKS.register("coolblockname", () -> new Block( Block.Properties.create(Material.ROCK) .harvestLevel(3) .harvestTool(ToolType.PICKAXE) .hardnessAndResistance(2.5F, 10F) )); public ExampleMod() { IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); BLOCKS.register(bus); MinecraftForge.EVENT_BUS.register(this); } } This is what the loot table for the block looks like: { "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:carrot" } ], "conditions": [ { "condition": "minecraft:survives_explosion" } ] } ] } Lastly, here's a quick video of me showing that the block does still drop in game (despite the wrong mining level/tool) If there's anything else that I can include to help diagnose the issue please let me know! Thanks
July 2, 20205 yr harvestLevel and harvestTool still need to be re-evaluated. Until they are, implementations of these two methods will not work.
July 2, 20205 yr Author 1 hour ago, ChampionAsh5357 said: harvestLevel and harvestTool still need to be re-evaluated. Until they are, implementations of these two methods will not work. Oh okay, thank you!
July 3, 20205 yr This also seems to be failing on forge 1.15 .... following tutorials all the other ‘basic’ things work but this.
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.