This is a mod provides GroovyScript extenders for working with GameStages. It allows pack makers to add/remove/check stages on players more intuitively.
This mod adds game stage related methods to the EntityPlayer class, pack makers can simply call the methods as if they were a part of the class.
The methods are as follows:
| GroovyStages method | GameStages method | Functionality |
|---|---|---|
hasStage(String) |
hasStage(EntityPlayer, String) |
Returns true or false, checks if the player has a game stage. |
hasAnyStage(String...) |
hasAnyOf(EntityPlayer, String...) |
Returns true or false, checks if the player has any of the game stages provided. |
hasAllStages(String...) |
hasAllOf(EntityPlayer, String...) |
Returns true or false, checks if the player has all game stage provided. |
addStage(String) |
addStage(EntityPlayer, String) |
Adds the provided game stage to the player. |
addAllStages(String...) |
Adds all the provided game stages to the player. | |
removeStage(String) |
removeStage(EntityPlayer, String) |
Removes the provided game stage from the player. |
removeStage(String...) |
Removes all the provided game stages from the player. | |
syncStages() |
syncPlayer(EntityPlayer) |
Synchronizes game stages between client and server. Provided mostly as an emergency. |
import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed
event_manager.listen { BreakSpeed ev ->
if (ev.getEntityPlayer().hasStage("advancedMining"))
ev.setNewSpeed(ev.getOriginalSpeed() + 1.5f)
}
Yes, this mod is cleanroom compatibile, all versions of the mod marked as -cleanroom are made to run on cleanroom specifically and therefore require the Relauncher and Fugue, the forge versions are unmarked.