Started by
SupahDupahAd
on
Topic category: Help with Minecraft modding (Java Edition)
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.
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.)
Anychance yoi can give me an example? I cant figure it out
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.)