Started by
FazeThree
on
Topic category: Help with Minecraft modding (Java Edition)
I don't know how to change the item a block will drop when mined by a specific tool. For example I'm trying to make a "pickaxe" that when mines "Iron Ore" the player will get Iron Ingots instead or Raw Iron.
There are several methods to doing this. Here are two that I can think of:
1. Make a loottable that alters current vanilla lootable of that block (i'm not sure this will work at all because i don't think ores have loottables besides lapis/redstone/quartz)
2. You can make a procedure with global trigger "when block broken", check the block and delete the item on the ground and place the one you want instead using the "spawn gem" procedure.
Hope this helps!
I'll try to figure it out. Thanks for the help!
I am unable to figure out how to remove item entities when the block is broken, but this is what i have so far:
I have the global trigger set to "A block is broken", under that is an If statement with (Is iron_ore tagged in block tags as "minecraft:iron_ore"), if yes, then do (spawn item/gem "iron_ingot" at, x, y, z, pickup delay: 1, despawn: yes).
but it does not work. Anything I did wrong?
Rephrase: What did I do wrong?