Spawning (Woot)
Description
Controls item/fluid costs of a given mob or the default cost.
Identifier
Refer to this via any of the following:
mods.woot.spawning/* Used as page default */
mods.woot.Spawning
Adding Recipes
Adds a default fluid requirement to mobs without a specific spawning recipe:
groovymods.woot.spawning.addDefaultFluid(FluidStack)
Adds a default item requirement to mobs without a specific spawning recipe:
groovymods.woot.spawning.addDefaultItem(ItemStack)
Recipe Builder
Just like other recipe types, the Spawning also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.woot.spawning.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 0 and less than or equal to 6.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
FluidStackList
. Sets the fluid inputs of the recipe. Requires greater than or equal to 0 and less than or equal to 6.groovyfluidInput(FluidStack) fluidInput(FluidStack...) fluidInput(Collection<FluidStack>)
WootMobName
. Sets the entity being targeted. Requires eithername
to be defined and a valid name ordefaultSpawnRecipe
to be true.groovyname(String) name(EntityEntry) name(WootMobName)
boolean
. Sets if the default recipes are being targeted instead of a specific entity name. Requires eithername
to be defined and a valid name ordefaultSpawnRecipe
to be true. (Defaultfalse
).groovydefaultSpawnRecipe() defaultSpawnRecipe(boolean)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
oripsis.woot.farming.ISpawnRecipe
).groovyregister()
Example
mods.woot.spawning.recipeBuilder()
.name('minecraft:zombie')
.input(item('minecraft:clay'))
.fluidInput(fluid('water'))
.register()
mods.woot.spawning.recipeBuilder()
.defaultSpawnRecipe(true)
.input(item('minecraft:gold_ingot'), item('minecraft:diamond'))
.register()
Removing Recipes
Removes the recipe for the given entity:
groovymods.woot.spawning.remove(WootMobName)
Removes the recipe for the given entity:
groovymods.woot.spawning.removeByEntity(EntityEntry)
Removes the recipe for the given entity:
groovymods.woot.spawning.removeByEntity(String)
Removes the recipe for the given entity:
groovymods.woot.spawning.removeByEntity(String, String)
Removes the recipe for the given entity:
groovymods.woot.spawning.removeByEntity(WootMobName)
Removes all registered recipes:
groovymods.woot.spawning.removeAll()
Example
mods.woot.spawning.remove(new WootMobName('minecraft:ender_dragon'))
mods.woot.spawning.removeByEntity(entity('minecraft:ender_dragon'))
mods.woot.spawning.removeByEntity('minecraft:ender_dragon')
mods.woot.spawning.removeByEntity('minecraft:ender_dragon', '')
mods.woot.spawning.removeByEntity(new WootMobName('minecraft:ender_dragon'))
mods.woot.spawning.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.spawning.streamRecipes()