Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Leaderboard

Popular Content

Showing content with the highest reputation on 07/26/20 in Posts

  1. Hello, I've set my mod block harvest tool to pickaxe and level to 1, which should cause it to drop nothing when mined with a wooden pickaxe. However this not only does not take place, but I'm even able to harvest the block by mining it with a bare hand. Code details Block registration: public static final RegistryObject<Block> COPPER_ORE = BLOCKS.register("copper_ore", MetalOreBlock::new); MetalOreBlock class: package ... import ... public class MetalOreBlock extends Block { public MetalOreBlock() { super(Block.Properties .create(Material.ROCK) .sound(SoundType.STONE) .hardnessAndResistance(3.0f, 3.0f) .harvestLevel(1) .harvestTool(ToolType.PICKAXE) ); } } How to fix it? Thanks in advance!
  2. It's not I was just seeing if I could fit an entire mod in one class for fun I guess not, thanks for the help!
  3. I'm afraid player capability is the only way to achieve this afaik. It is not as simple as storing the data in the fields in your event class (which won't work), but it is the only way I can think of. Also it is not so complicated isn't it?
  4. Strange, because the PlayerLoggedInEvent fires for me when I log on to a dedicated server. What version are you running? And how are you registering your event listener?
  5. 0 = none 1 = wood 2 = stone 3 = iron 4 = diamond
  6. My block class look like this: package ... import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraftforge.common.ToolType; public class MetalBlock extends Block { public MetalBlock() { super(Block.Properties .create(Material.IRON) .sound(SoundType.METAL) .hardnessAndResistance(5.0f, 6.0f) .harvestLevel(1) .harvestTool(ToolType.PICKAXE) .setRequiresTool() //or func_235861_h_() ); } } and I'm mining it with vanilla tools. I haven't created any tools in my mod yet to test it out. Are you experiencing the problem with vanilla tools?
  7. setRequiresTool() in AbstractBlock.Properties So canHarvestBlock() will do tool checking when block is harvest. You can also see how blocks in Blocks.java do it.
  8. I'm using MDK version 32.0.75. Found solution: at [1.16.1] [SOLVED] Block drops not respecting harvest level and tooltype
  9. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  10. Didn't seem to help Here's a pastebin link to the build output: https://pastebin.com/yhXVGCFL Heres another pastebin to my build.gradle: https://pastebin.com/ZgnH6rrm

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.