PotionBrewEvent
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 crafttweaker.forge.api.event.brewing.PotionBrewEvent;
Extends
PotionBrewEvent extends Event
.
Members
cancel()
Cancels the event. Same as script.zs
setCanceled(true)
// PotionBrewEvent.cancel();myPotionBrewEvent.cancel();
Getter
// PotionBrewEvent.cancelable as boolmyPotionBrewEvent.cancelable
Return Type:
bool
cancelable() as bool
// PotionBrewEvent.cancelable() as bool;myPotionBrewEvent.cancelable();
Return Type:
bool
Getter
// PotionBrewEvent.canceled as boolmyPotionBrewEvent.canceled
Return Type:
bool
Setter
// PotionBrewEvent.canceled = (cancel as bool);myPotionBrewEvent.canceled = myBool;
Parameters:
cancel: bool
Type: bool
canceled() as bool
// PotionBrewEvent.canceled() as bool;myPotionBrewEvent.canceled();
Return Type:
bool
canceled(cancel as bool)
// PotionBrewEvent.canceled(cancel as bool);myPotionBrewEvent.canceled(myBool);
Parameters:
cancel: bool
Type: bool
getItem(index as int) as IItemStack
Getter
// PotionBrewEvent.hasResult as boolmyPotionBrewEvent.hasResult
Return Type:
bool
hasResult() as bool
// PotionBrewEvent.hasResult() as bool;myPotionBrewEvent.hasResult();
Return Type:
bool
Getter
// PotionBrewEvent.length as intmyPotionBrewEvent.length
Return Type:
int
Getter
// PotionBrewEvent.result as EventResultmyPotionBrewEvent.result
Return Type:
EventResult
Setter
myPotionBrewEvent.result = myResult;
Parameters:
result: EventResult
Type: EventResult
result() as Result
result(result as Result)
myPotionBrewEvent.result(myResult);
Parameters:
result: EventResult
Type: EventResult
setAllow()
sets the event's result to script.zs
allow
// PotionBrewEvent.setAllow();myPotionBrewEvent.setAllow();
setDefault()
sets the event's result to script.zs
default
// PotionBrewEvent.setDefault();myPotionBrewEvent.setDefault();
setDeny()
sets the event's result to script.zs
deny
// PotionBrewEvent.setDeny();myPotionBrewEvent.setDeny();
setItem(index as int, stack as IItemStack)
myPotionBrewEvent.setItem(myInt, myIItemStack);
Parameters:
index: int
Type: int
stack: IItemStack
Type: IItemStack