PlayManager
This class was added by a mod with mod-id cinematic_transitions
. So you need to have this mod installed if you want to use this feature.
Importing the class
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.
import mods.cinematic_transitions.PlayManager;
Static Methods
Return Type: void
PlayManager.playPopUp(registryName as string) as void
Parameter | Type | Description |
---|---|---|
Parameter registryName | Type string | Description take the registry name of a PopUp registered using Json, plays the popup provided. |
Plays transition (black bars on the top and bottom of screen) with no children (popups)
Return Type: void
// PlayManager.playTransition() as void
PlayManager.playTransition();
Return Type: void
PlayManager.playTransition(childName as string) as void
Parameter | Type | Description |
---|---|---|
Parameter childName | Type string | Description Plays transition with child. Syncs up the child wait duration and transition length to parent’s |
Registers a listener that triggers given popup when player enters given biome
Return Type: void
PlayManager.registerBiomePopUpListener(biomeName as string, popUp as string, hasTransition as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter biomeName | Type string | Description registry name of biome |
Parameter popUp | Type string | Description registry name of popup |
Parameter hasTransition | Type boolean | Description whether if transition should be played |
Registers a listener that triggers given popup when player enters given dimension
Return Type: void
PlayManager.registerDimensionPopUpListener(dimensionName as string, popUp as string, hasTransition as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter dimensionName | Type string | Description registry name of dimension |
Parameter popUp | Type string | Description registry name of popup |
Parameter hasTransition | Type boolean | Description whether if transition should be played |
Registers a listener that triggers given popup when given entity spawns
Return Type: void
PlayManager.registerEntityPopUpListener(entityName as string, popUp as string, hasTransition as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter entityName | Type string | Description entity type |
Parameter popUp | Type string | Description registry name of popup |
Parameter hasTransition | Type boolean | Description whether if transition should be played |
Registers a listener that triggers given popup when player enters given structure
Return Type: void
PlayManager.registerStructurePopUpListener(structureName as string, popUp as string, hasTransition as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter structureName | Type string | Description registry name of structure |
Parameter popUp | Type string | Description registry name of popup |
Parameter hasTransition | Type boolean | Description whether if transition should be played |
Return Type: void
PlayManager.setHideInventory(hideInventory as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter hideInventory | Type boolean | Description whether if the hotbar, health, etc should be hidden during popup/transition |