#drop probabilities
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
There are multiple ways to do this.
- adjust the drop chance in the same command when giving them the bow and repair the bow as long as the skeleton has it
- set the drop chance to 0 and give it a custom death loot table (which would be better because you don't have to worry about the bow durability)
how i can adjust the drop chances ?
Like this for example:
summon skeleton ~ ~ ~ {HandItems:[{id:"minecraft:bow",count:1,components:{"minecraft:enchantments":{levels:{"minecraft:power":10}}}}],HandDropChances:[0.5F,0.085F]}
The tag at the end determines the chance. The first value is the mainhand and the second value is the offhand. 0F - 1F is equal to 0% - 100%.
There are also special values:
- 2 for a 100% drop chance with an undamaged tool.
- -327.67 to disable the looting enchantment for that item.
how it would be in this command : item replace entity @s weapon.mainhand with minecraft:bow{Enchantments:[{id:"power",lvl:10}],Damage:0} ?
Didn't you do it with data merge?
It is entity nbt, so you have to modify the nbt with data merge or data modify.
data merge entity <the selector to the entity> {HandDropChances:[0.5F,0.085F]}
this is the full command : data merge entity @s {CustomName:'{"text":"Esqueleto de la muerte","color":"red"}'}
item replace entity @s weapon.mainhand with minecraft:bow{Enchantments:[{id:"power",lvl:10}],Damage:0}
add HandDropChances:[0.5F,0.085F], in front of the CustomName tag.
i don´t get it
in front of :'{"text":"Esqueleto de la muerte","color":"red"}'} ?
data merge entity @s {HandDropChances:[0.5F,0.085F], CustomName:'{"text":"Esqueleto de la muerte","color":"red"}'}
done, that´s it? or we are missing something else?
That's it. You only have to adjust the value to what you think works best.
and drop it at maximum durability?
.
Sorry to bother you but is that a yes?
if you set it to 2 yes
like this?
yes
what would it be like if I wanted the probability of the skeleton dropping the bow to be 3% and dropping it with full durability?
.
i tried my best, but now the skeleton always drop the bow
at least the bow is fully repaired
because you set it to 2. That's why.
the first 2f is for the durability?
no the first is for the mainhand.
so i leave it like that?
2 is just a special value, as I said before in this message
yes
for what is the 0?
HandDropChance is an array (an array is basically a list) with 2 float (a float is a real number) values. In your case, the values are 2 (100% drop chance with full durability) for the main hand and 0.2 (20%) for the offhand.
got it, i will try, give me a minute
so, now the chances of dropping the bow are of 20%?
Do they have the bow in the offhand? I don't think so.
but it still droppping the bow with random durability
so, it should be like this?
If you want them to drop with a 20% chance, yes.
and, if i want them to drop with a 3% chance it would be 0,03?
yes
That's the restriction when you want to control it via the HandDropChances tag.
If you want more control, you have to create a custom loot table or modify the default one if all skeletons get modified.
And how do I create a custom loot table?
Best way is to use misode.
There are even presets for the vanilla loot tables.
You can load the skeleton loot table and add the bow to it.
i think i made it