PotInteractionManager
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import mods.botanypots.PotInteractionManager;
Description
Implements
PotInteractionManager
implements the following interfaces:
IRecipeManager<PotInteraction>
,CommandStringDisplayable
Undocumented Interfaces
Iterable<Recipe>
Members
// PotInteractionManager.addInteraction(id as string, heldTest as IIngredient, damageHeld as bool, soilTest as IIngredient = null, seedTest as IIngredient = null, newSoilStack as IItemStack = null, newSeedStack as IItemStack = null, sound as Sound = null, extraDrops as IItemStack[] = [] as crafttweaker.api.item.IItemStack[]);<recipetype:botanypots:pot_interaction>.addInteraction("interaction_test", <item:minecraft:diamond>, false, null, null, null, <item:minecraft:iron_ingot>, Sound.of(<soundevent:minecraft:ambient.basalt_deltas.additions>, <constant:minecraft:sound/source:neutral>, 1,1), [<item:minecraft:stick>]);
Parameters:
id: string
Type: string
- The ID of the interaction. damageHeld: bool
Type: bool
- Whether the held item should be damaged during the interaction. soilTest: IIngredient
(optional) Type: IIngredient
- What soil does this interaction happen on.
Default Value: null
seedTest: IIngredient
(optional) Type: IIngredient
- What seed is this interaction for
Default Value: null
newSoilStack: IItemStack
(optional) Type: IItemStack
- The new soil stack to replace the current soil.
Default Value: null
newSeedStack: IItemStack
(optional) Type: IItemStack
- The new seed stack to replace the current seed.
Default Value: null
extraDrops: IItemStack[]
(optional) Type: IItemStack[]
- Additional items to drop during the interaction.
Default Value: [] as crafttweaker.api.item.IItemStack[]
// PotInteractionManager.commandString as string<recipetype:botanypots:pot_interaction>.commandString
Return Type:
string
// PotInteractionManager.commandString() as string;<recipetype:botanypots:pot_interaction>.commandString();
Return Type:
string
<recipetype:botanypots:pot_interaction>.getRecipesByOutput(myIIngredient);
Parameters:
output: IIngredient
Type: IIngredient
Return Type:
List<Recipe>
BasicPotInteraction
, replacing it with the new one from the function.Returns: true if the interaction was found, and is a BasicPotInteraction
, false otherwise.
// PotInteractionManager.modify(id as string, modifier as BiFunction<BasicPotInteraction, ResourceLocation, BasicPotInteraction>) as bool;<recipetype:botanypots:pot_interaction>.modify("botanypots:minecraft/pot_interaction/till_farmland", (id, old) => BasicPotInteraction.of(id, old.heldTest, old.damageHeld, old.soilTest, old.seedTest, old.newSoilStack, old.newSeedStack, old.sound, old.extraDrops));
Parameters:
id: string
Type: string
- The id of the interaction to replace. modifier: BiFunction<BasicPotInteraction, ResourceLocation, BasicPotInteraction>
Type: BiFunction<BasicPotInteraction, ResourceLocation, BasicPotInteraction>
- the modifier to apply to the interaction.
Return Type:
bool
<recipetype:botanypots:pot_interaction>.recipeMap
Return Type:
Recipe[ResourceLocation]
// PotInteractionManager.removeAll();<recipetype:botanypots:pot_interaction>.removeAll();
// PotInteractionManager.removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false);<recipetype:botanypots:pot_interaction>.removeByModid(myString, myPredicate);
Parameters:
modid: string
Type: string
exclude: function(t as string) as bool
(optional) Type: function(t as string) as bool
Default Value: (name as string) as bool => false
// PotInteractionManager.removeByName(names as string[]);<recipetype:botanypots:pot_interaction>.removeByName(myString[]);
Parameters:
names: string[]
Type: string[]
// PotInteractionManager.removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false);<recipetype:botanypots:pot_interaction>.removeByRegex(myString, myPredicate);
Parameters:
regex: string
Type: string
exclude: function(t as string) as bool
(optional) Type: function(t as string) as bool
Default Value: (name as string) as bool => false