#Ore Break Detection
1 messages · Page 1 of 1 (latest)
Are you trying to make it so let's say when coal is mined
Instead of dropping coal, it'll drop something else?
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
I can think of a solution using just commands but it has some flaws
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
Alright
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
oh yeah sounds awesome
/execute at @e[type=item,name=Coal] if entity @e[type=xp_orb,r=4] run /loot
/kill @e[type=item,name=Coal]
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
@opal blade Hello check dm
/scoreboard players random r r 1 2
(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
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?
Are you able to use command blocks?
It'd be much easier than using a .mcfunction
yes i can use cmd blocks, i assume that the first is repeat, unconditional always active and the rest are chain unconditional always active?
Are you wanting for it to be randomized?
if i can make it drop a particular loot table that would be preffered
/execute at @e[type=item,name=Coal] if entity @e[type=xp_orb,r=4] run /loot
↑ repeating command block always active
↓ chained conditional always active
/kill @e[type=item,name=Coal]
for some reason it doesn't work. It still just drops the regular coal and nothing happens
Can you show the command?
thats in the repeat always active, have tried both conditional and unconditional for it
seems to work in chat but doesnt work within cmd blocks, have double checked and theyre definately enabled
It's "Coal"