How do I change block loot tables

Started by FazeThree on

Topic category: Help with modding (Java Edition)

Last seen on 15:50, 17. Mar 2023
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I change block loot tables

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.

Last seen on 18:20, 18. Apr 2024
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There are several methods to…
Fri, 03/10/2023 - 10:46

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!

Last seen on 15:50, 17. Mar 2023
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'll try to figure it out…
Mon, 03/13/2023 - 15:28

I'll try to figure it out. Thanks for the help!

Last seen on 15:50, 17. Mar 2023
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I am unable to figure out…
Mon, 03/13/2023 - 16:00

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?

Last seen on 15:50, 17. Mar 2023
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Rephrase: What did I do…
Mon, 03/13/2023 - 16:01

Rephrase: What did I do wrong?