Seeds
Link to seeds
Seeds are things you get from punching tall grass.
Print all seeds to the log
Link to print-all-seeds-to-the-log
This command will print all registered seeds to the log.
Needs to be performed by a player or console, cannot be written in a zs-file.
Copy1.12
/ct seeds
pre-1.12
/mt seeds
Add a seed drop
Link to add-a-seed-drop
Adds item
as seed drop.
Weights are relative to grass seed, which has a weight of 10 (≙ 10%)!
ZenScript Copyvanilla.seeds.addSeed(item);
item
is a weightedItemStack.
What does that mean? It simply means that you need to give it a percentage like this:
ZenScript Copy//adds carrots with a weight of 1
vanilla.seeds.addSeed(<minecraft:carrot> % 1);
Remove a seed drop
Link to remove-a-seed-drop
Stops item
from being a seed drop.
ZenScript Copyvanilla.seeds.removeSeed(item);
item
is an IIngredient.
Retrieve all registered Seeds
Link to retrieve-all-registered-seeds
Returns all items as a weightedItemStack List.
ZenScript Copyval seedList = vanilla.seeds.seeds;
for item in seedList {
print("Item: " ~ item.stack.displayName ~ " || Chance: " ~ item.percent ~ "%");
}