just looking through the leaf drops, is it possible to make it a chance to drop sticks would i just add "quantity": { "min": 0, "max": 2} ? will it still drop 1 sometimes? using json
There are a number of ways you could achieve that depending on how much control you want.
I've modified the leaf example from the docs in different ways below.
Example #1
{
"rules": [
{
"match": {
"blocks": {
"blocks": [
"minecraft:leaves:*"
]
}
},
"replaceStrategy": "ADD",
"drops": [
{
"item": {
"items": [
"minecraft:stick"
],
"selector": {
"weight": 75
}
}
},
{
"item": {
"selector": {
"weight": 25
}
}
}
]
}
]
}
In example #1, item selectors are used to determine drop chance. The first item is the stick and has a weight of 75 and the second item is empty with a weight of 25. This would drop sticks 75% of the time.
Note: Weights don't have to add up to 100. For more info on weights, see https://dropt.readthedocs.io/en/latest/gettingstarted#selecting-drops
Example #2
{
"rules": [
{
"match": {
"blocks": {
"blocks": [
"minecraft:leaves:*"
]
}
},
"replaceStrategy": "ADD",
"dropCount": {
"min": 0,
"max": 2
},
"drops": [
{
"item": {
"items": [
"minecraft:stick"
]
}
}
]
}
]
}
Example #2 uses the dropCount
object to define how many items should be dropped. This will drop no sticks, one stick, or two sticks. The drop chance for each quantity of sticks is equal.
Example #3
{
"rules": [
{
"match": {
"blocks": {
"blocks": [
"minecraft:leaves:*"
]
}
},
"replaceStrategy": "ADD",
"drops": [
{
"item": {
"items": [
"minecraft:stick"
],
"quantity": {
"min": 0,
"max": 2
}
}
}
]
}
]
}
Example #3 uses the item's quantity
object to define how many items should be dropped. Like the previous example, this will drop no sticks, one stick, or two sticks and the drop chance for each quantity of sticks is equal.