Mob Disassembler (Factory Tech)
Description
Kills an entity in-world, dropping the mob's normal loot in addition to custom loot.
Identifier
Refer to this via any of the following:
mods.factorytech.disassembler/* Used as page default */
mods.factorytech.Disassembler
Adding Recipes
Adds the given entry to the map:
groovymods.factorytech.disassembler.add(Map.Entry<Class<? extends EntityLiving>, List<ItemStack>>)
Recipe Builder
Just like other recipe types, the Mob Disassembler 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.factorytech.disassembler.recipeBuilder()
ItemStackList
. Sets the item outputs of the recipe. Requires greater than or equal to 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
Class<? extends EntityLiving>
. Sets the entity class used. Requires not null.groovyentity(EntityEntry) entity(Class<? extends EntityLiving>)
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
orjava.util.Map$Entry<java.lang.Class<? extends net.minecraft.entity.EntityLiving>, java.util.List<net.minecraft.item.ItemStack>>
).groovyregister()
Example
mods.factorytech.disassembler.recipeBuilder()
.entity(entity('minecraft:chicken'))
.output(item('minecraft:obsidian'), item('minecraft:gold_ingot') * 2, item('minecraft:clay'), item('minecraft:diamond'))
.register()
mods.factorytech.disassembler.recipeBuilder()
.entity(entity('minecraft:rabbit'))
.output(item('minecraft:clay'), item('minecraft:diamond') * 2)
.register()
Removing Recipes
Removes the given entry from the map:
groovymods.factorytech.disassembler.remove(Map.Entry<Class<? extends EntityLiving>, List<ItemStack>>)
Removes all recipes matching the given entity class:
groovymods.factorytech.disassembler.removeByEntity(Class<? extends EntityLiving>)
Removes all recipes matching the given entity class:
groovymods.factorytech.disassembler.removeByEntity(EntityEntry)
Removes all recipes that match the given output:
groovymods.factorytech.disassembler.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.factorytech.disassembler.removeAll()
Example
mods.factorytech.disassembler.removeByEntity(entity('minecraft:creeper'))
mods.factorytech.disassembler.removeByOutput(item('minecraft:rotten_flesh'))
mods.factorytech.disassembler.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.factorytech.disassembler.streamRecipes()