This class was added by a mod with mod-id zensummoning. So you need to have this mod installed if you want to use this feature.

Diese Klasse importieren

Link to diese-klasse-importieren

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import mods.zensummoning.SummoningInfo;

Name: create

Creates a new SummoningInfo with default values.
See other methods for adding more customization.


Same as constructor.

Returns: new info
Return Type: SummoningInfo

ZenScript
Copy
// SummoningInfo.create() as SummoningInfo

SummoningInfo.create();

No Description Provided

ZenScript
Copy
new SummoningInfo() as SummoningInfo
new SummoningInfo();

Name: addCondition

Adds an additional condition for the summoning to work. This can be used to require a gamestage (or deny one I guess)

Return Type: SummoningInfo

ZenScript
Copy
// SummoningInfo.addCondition(condition as Predicate<SummoningAttempt>, failureMessage as string, jeiDescription as string) as SummoningInfo

mySummoningInfo.addCondition(Predicate for summoning to succeed, Chat message to show on failure, Line to show in JEI preview);
ParameterTypeBeschreibung
Parameter
condition
Type
Predicate<SummoningAttempt>
Beschreibung
condition
Parameter
failureMessage
Type
string
Beschreibung
chat message on failure
Parameter
jeiDescription
Type
string
Beschreibung
No Description Provided

Name: addMob

Adds a new mob to the summoning. Returns itself for builder pattern.

Return Type: SummoningInfo

ZenScript
Copy
// SummoningInfo.addMob(info as MobInfo) as SummoningInfo

mySummoningInfo.addMob(MobInfo.create().setMob("minecraft:zombie"));
ParameterTypeBeschreibung
Parameter
info
Type
MobInfo
Beschreibung
mob to add

Name: setCatalyst

Sets the catalyst that will be used to start the ritual.

Return Type: SummoningInfo

ZenScript
Copy
// SummoningInfo.setCatalyst(ingredient as IIngredientWithAmount) as SummoningInfo

mySummoningInfo.setCatalyst(<item:minecraft:stick> * 2);
ParameterTypeBeschreibung
Parameter
ingredient
Type
IIngredientWithAmount
Beschreibung
catalyst

Link to setConsumeCatalyst

Name: setConsumeCatalyst

Determines whether or not the catalyst will be consumed.

Return Type: SummoningInfo

ZenScript
Copy
// SummoningInfo.setConsumeCatalyst(value as boolean) as SummoningInfo

mySummoningInfo.setConsumeCatalyst(false);
ParameterTypeBeschreibung
Parameter
value
Type
boolean
Beschreibung
consumed

Name: setMutator

Custom callback to determine if a summon should be allowed.

Return Type: SummoningInfo

ZenScript
Copy
// SummoningInfo.setMutator(mutator as Consumer<SummoningAttempt>) as SummoningInfo

mySummoningInfo.setMutator((attempt as SummoningAttempt) => {
 if (attempt.world.raining) {
 attempt.success = false;
 attempt.message = "Can't summon this in the rain!";
 } else {
 attempt.message = "Good Luck!";
 }
 });
ParameterTypeBeschreibung
Parameter
mutator
Type
Consumer<SummoningAttempt>
Beschreibung
callback

Name: setReagents

Sets the ingredients to be required to start the summon.

Return Type: SummoningInfo

ZenScript
Copy
// SummoningInfo.setReagents(reagents as IIngredientWithAmount[]) as SummoningInfo

mySummoningInfo.setReagents([<item:minecraft:stone>, <item:minecraft:egg>*12]);
ParameterTypeBeschreibung
Parameter
reagents
Type
IIngredientWithAmount[]
Beschreibung
ingredient list

Name: setSound

Sets the sound played when a summon completes.

Return Type: SummoningInfo

ZenScript
Copy
// SummoningInfo.setSound(sound as string) as SummoningInfo

mySummoningInfo.setSound("entity.evoker.prepare_wololo");
ParameterTypeBeschreibung
Parameter
sound
Type
string
Beschreibung
sound resource location

Name: setWeight

Sets the weight that this summoning has. Summonings with the same catalyst and reagents are determined randomly using this.

Return Type: SummoningInfo

ZenScript
Copy
// SummoningInfo.setWeight(weight as double) as SummoningInfo

mySummoningInfo.setWeight(3);
ParameterTypeBeschreibung
Parameter
weight
Type
double
Beschreibung