Changing Mob Drops
Last updated
Was this helpful?
Last updated
Was this helpful?
With Hungry Animals, cows drop more than 30+ meats by default. It is because HA cows are considered more expensive than vanilla cows. They have more hp, eat a lot, and grow slowly.
There are some methods to change this behavior. First one is Easy Config. Next is Master Config. The last one is changing loot tables.
You can easily make it"tempo": "fast"
. This config make animals less expensive, make cows drop 10+ meats, pigs drop 3 meats.
You can also precisely control meat drop using Master Config. It is done by changing loot tables.
First of all, you must indicate pattern
for loot tables. "loot_tables/minecraft/*.json"
will change all vanilla animals' drop.
Next step is building modifier
. modifier
s search json objects by matching their shape, and apply operator to found json objects' fields.
modifier
like Example A searches json files with the pattern
. Then they will find json object {}
, then "height"
field. Value of "height"
field will be changed by operator.
Let's checkout examples below. Target A will be modified, but Target B won't. Because Target B's "height"
is not directly under the base json object, it is wrapped by one more json object, "image"
.
To modify Target B, the modifier
of Example A should contain "image"
.
modifier
s can contain json array. This modifier searches json array []
, and applies operator to every elements of the array.
Finally modifier
for loot tables looks like Example C.
This will change "weight_per_meat"
value. "weight_per_meat"
determines number of meats dropped by animals. The amount is calculated by formula:
For example, 550 kg cow with weight_per_meat = 10kg
drops (550kg-0.5*500kg)/(10kg) = 30
meats.
operator
s are one of addition, multiplication, and assignment. Example Addition will add 10 to every searched json elements, Example Multiplication will multiply 4, Example Assignment will set 0.
According to the meat formula above, increasing "weight_per_meat"
decreases meat dropped. * 2
will approximately half the amount. Here's the final example, Example D.