#Check player
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1722348245:t>, feel free to use the Summon Helpers button to ping our helper team.
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
If you're in 1.20.5+ you can use execute if items
That's 1.20.5+
entity, you're checking a player which is an entity
block is for checking stuff like chests
So it's iron_pickaxe[custom_data={p:10}] or something?
run execute if items entity iron_pickaxe[custom_data={p:10}] so?
Do you know, as I do, that if a player mines with a custom pickaxe, he gets twice the amount of stones?
I'm not quite sure what you're asking
this command doesn't work
execute if score @s Level matches 10000.. run execute if items entity @s container.* iron_pickaxe[custom_data={p:10}] run experience add @s -10000 levels
execute if score @s Level matches 10000.. run execute if items entity @s container.* iron_pickaxe[custom_data={p:10}] run give @p diamond_pickaxe[custom_name='"Zerbrecherer"',unbreakable={},rarity="rare",custom_data={p:11},enchantments={levels:{"minecraft:fortune":1}},enchantment_glint_override=false,attribute_modifiers={modifiers:[{id:"block_break_speed",type:"player.block_break_speed",amount:5,operation:"add_value",slot:"mainhand"}],show_in_tooltip:false}] 1
execute if score @s Level matches 10000.. run clear @p iron_pickaxe[custom_name='{"color":"gold","text":"Zerbrecher"}',unbreakable={},custom_data={p:10},enchantment_glint_override=false,attribute_modifiers={modifiers:[{id:"block_break_speed",type:"player.block_break_speed",amount:4,operation:"add_value",slot:"mainhand"}],show_in_tooltip:true}] 1
What command are you using to get the item in the first place?
trade from villager
And it's an iron pickaxe with custom data of {p:10}?
found the error
Can I somehow change the number of stones that drop when you mine them with a special pickaxe?
How I can make this?
Check out https://misode.github.io/loot-table
They have all the vanilla files under presets, so you can start from the stone one and make whatever changes you want
how can I change the loot table there with a specific tool?
You need a "match tool" predicate, I think it's called
Can you send your loot table file?
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:stone",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": "minecraft:diamond_pickaxe",
"count": 2,
"components": {
"minecraft:custom_data": "p:11"
}
}
}
]
},
{
"type": "minecraft:item",
"name": "minecraft:cobblestone"
}
]
},
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"name": "minecraft:stone",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
]
},
{
"type": "minecraft:item",
"name": "minecraft:cobblestone",
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}
]
}
],
"random_sequence": "minecraft:blocks/stone"
}
this is the custom item give @p diamond_pickaxe[custom_name='"Zerbrecherer"',unbreakable={},rarity="rare",custom_data={p:11},enchantments={levels:{"minecraft:fortune":1}},enchantment_glint_override=false,attribute_modifiers={modifiers:[{id:"block_break_speed",type:"player.block_break_speed",amount:5,operation:"add_value",slot:"mainhand"}],show_in_tooltip:false}] 1
Yeah well you're giving two cobblestone always, but an extra stone if they have the special pickaxe
Also, you're checking for two of the pickaxe, which is not going to happen
how i make this correct
Well, you probably want to check for the tool when giving the second cobblestone
And remove "count": 2
do you know why this is red
You need quotes around p
p:11 is my custom tag from the dia pick axe
Yes I know
waht mean with quotes?
"p": 11
when i break a stone with my pick axe it trops stone and coblestone
Yeah, because you're dropping an extra stone if you mine it with the pickaxe
Also instead of checking for custom data, you're setting custom data on the stone item, which again is not what you want
Your question, #1267837621401423904 (Check player), was resolved!
#1267837621401423904 message
1d1h26m