#Ore Break Detection

1 messages · Page 1 of 1 (latest)

patent frost
#

Can you elaborate further?

#

Are you trying to make it so let's say when coal is mined

#

Instead of dropping coal, it'll drop something else?

opal blade
#

yes thats exactly what im after, swapping for example a coal ore dropping 1 coal to dropping 1-2 cobble and 1 coal on break.

#

using the command in game just by typing it out seems to work fine. So im unsure as to why it doesnt work on block break

patent frost
#

An example is if people name items the same name as Coal, and put xp near that item, it'll load the loot table up

opal blade
#

that shouldn't be a problem its for an adventure map

#

how does it work?

patent frost
patent frost
# opal blade how does it work?

Basically, it'll detect if there's an item named "coal" and if coal has xp orbs near it, it'll load up a loot table/and or structure using the /execute command

#

You can also randomize it

opal blade
#

oh yeah sounds awesome

patent frost
#

You can fill in the loot command

#

If you want it to randomly pick a loot table (you specified)

#

Chat command
/scoreboard objectives add r dummy

drifting kestrel
#

@opal blade Hello check dm

patent frost
#

(not a chat command)

#

/execute at @e[type=item,name=Coal] if entity @e[type=xp_orb,r=4] if score r r matches 1 run /loot

Second loot table
/execute at @e[type=item,name=Coal] if entity @e[type=xp_orb,r=4] if score r r matches 2 run /loot

opal blade
#

sorry im a little confused, if /scoreboard players random r r 1 2 is not a chat command how do i execute it?

#

am i just setting up a scoreboard with the name r?

patent frost
#

It'd be much easier than using a .mcfunction

opal blade
#

yes i can use cmd blocks, i assume that the first is repeat, unconditional always active and the rest are chain unconditional always active?

patent frost
opal blade
#

if i can make it drop a particular loot table that would be preffered

patent frost
opal blade
#

for some reason it doesn't work. It still just drops the regular coal and nothing happens

opal blade
#

thats in the repeat always active, have tried both conditional and unconditional for it

opal blade
#

seems to work in chat but doesnt work within cmd blocks, have double checked and theyre definately enabled