Experience from ore blocks

Started by SupahDupahAd on

Topic category: Help with modding (Java Edition)

Last seen on 20:57, 10. Mar 2024
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Experience from ore blocks

Ive created an ore and use a loot table for fortune. However i want the ore to also drop xp when broken and it look natura? Is there a way to do this and can someone show me? I want the ore to only drop xp when mined with correct tool also. 

Last seen on 20:08, 17. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can make a procedure…
Wed, 01/17/2024 - 12:58

You can make a procedure with the 'when block broken' trigger, then check if the item in the main hand or the off hand of the event/target entity is the correct tool type/tier. If it is, there's a 'summon XP orb' function that you can use to spawn xp.

 (To make it look like a regular ore block, set the spawn location to x+0.5, y+0.5, z+0.5, use a 'repeat' bracket set to 'random number between 2 and 4,' and use 'random number between 1 and 2' for the xp amount.)

Last seen on 20:57, 10. Mar 2024
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Anychance yoi can give me an…
Wed, 01/17/2024 - 22:01

Anychance yoi can give me an example? I cant figure it out  

Last seen on 20:08, 17. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Like this: (You probably…
Wed, 01/17/2024 - 22:32

Like this: (You probably want to include the silk touch things just to make sure you can't break the block endlessly and get experience every time.)