[Request] Ability to add range drops to Entities based on data value.
The-Arcanian opened this issue ยท 3 comments
If you add a drop to an animal entity then even baby animals will drop that item. It might be posable to check against the animal's age value in a drop function, but they do not allow for a drop range output.
Example:
<entity:minecraft:pig>.addDrop(<minecraft:leather>, 1, 4);
All pigs, babies or not, will now drop 1-4 leather. From what I can tell there is no way to make only adult pigs drop 1-4 leather.
Use drop functions
http://crafttweaker.readthedocs.io/en/latest/#Vanilla/Entities/IEntityDropFunction/
You can cast the entity to IEntityLivingBase and then check if it is a child from there.
You can do ranged drops by using the world time and modulo, for example drop 1 + (entity.world.time % 4)
items
@jaredlll08 As I said in the OP, I tried drop functions, but they do not support a range of drops.
@kindlich Interesting workaround, but that gives cyclical drops based around time, I would prefer actual random.