Drops (Woot)
Description
Controls extra drops given by mobs. Chance and Size are both arrays 4 long, containing the values for levels 0/1/2/3 levels of Looting.
Identifier
Refer to this via any of the following:
mods.woot.drops/* Used as page default */
mods.woot.DropsAdding Recipes
Adds recipes in the format
wootMobName,itemStack,chances,sizes:groovymods.woot.drops.add(WootMobName, ItemStack, List<Integer>, List<Integer>)
Recipe Builder
Just like other recipe types, the Drops also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
Recipe Builder
Create the Recipe Builder.
groovymods.woot.drops.recipeBuilder()
ItemStackList. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)WootMobName. Sets the entity and nbt tags. Requires not null.groovyname(String) name(EntityEntry) name(WootMobName) name(String, String)List<Integer>. Sets the quantity of the drop for each level of Looting. Requires exactly 4.groovysize(int) size(int...) size(Collection<Integer>)List<Integer>. Sets the chance of the drop for each level of Looting. Requires exactly 4.groovychance(int) chance(int...) chance(Collection<Integer>)
First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullornet.minecraft.item.ItemStack).groovyregister()
Example
mods.woot.drops.recipeBuilder()
.name('minecraft:zombie')
.output(item('minecraft:clay'))
.chance(10, 30, 60, 100)
.size(5, 10, 20, 50)
.register()Removing Recipes
Removes recipes matching the given entity:
groovymods.woot.drops.removeByEntity(EntityEntry)Removes recipes matching the given entity:
groovymods.woot.drops.removeByEntity(String)Removes recipes matching the given entity:
groovymods.woot.drops.removeByEntity(String, String)Removes recipes matching the given entity:
groovymods.woot.drops.removeByEntity(WootMobName)Removes recipes matching the given output item:
groovymods.woot.drops.removeByOutput(ItemStack)Removes all registered recipes:
groovymods.woot.drops.removeAll()
Example
mods.woot.drops.removeByEntity(entity('minecraft:ender_dragon'))
mods.woot.drops.removeByEntity('minecraft:ender_dragon')
mods.woot.drops.removeByEntity('minecraft:ender_dragon', '')
mods.woot.drops.removeByEntity(new WootMobName('minecraft:ender_dragon'))
mods.woot.drops.removeByOutput(item('minecraft:dragon_breath'))
mods.woot.drops.removeAll()Getting the value of recipes
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.woot.drops.streamRecipes()
