An IWorld object represents the world the player is currently in.

It might be required for you to import the package if you encounter any issues, so better be safe than sorry and add the import.
import mods.contenttweaker.World;

ZenMethods without parameters and ZenGetters

Link to zenmethods-without-parameters-and-zengetters

ZenMethodZenGetterReturn type描述
ZenMethod
isRemote()
ZenGetter
remote
Return type
布尔值
描述
True if the world is a "slave" client; changes will not be saved or propagated from this world. For example, server worlds have this set to false, client worlds have this set to true.
ZenMethod
isRaining()
ZenGetter
raining
Return type
布尔值
描述
Returns true if it is currently raining
ZenMethod
isThundering()
ZenGetter
thundering
Return type
布尔值
描述
Returns true if it is currently thundering
ZenMethod
getMoonPhase()
ZenGetter
moonPhase
Return type
int
描述
Returns the current moon phase
ZenMethod
isDayTime()
ZenGetter
dayTime
Return type
布尔值
描述
Checks if it is daytime
ZenMethod
getWorldTime()
ZenGetter
time
Return type
long
描述
Returns the world's time
ZenMethod
getDimension()
ZenGetter
dimension
Return type
int
描述
Returns the world's dimension
ZenMethod
isSurfaceWorld()
ZenGetter
surfaceWorld
Return type
布尔值
描述
Returns whether you are in a surface world or not
ZenMethod
getDimensionType()
ZenGetter
dimensionType
Return type
字符串[string]
描述
Returns the dimension's type name
ZenMethod
getRandom()
ZenGetter
random
Return type
CTRandom
描述
Returns the world's random number generator

ZenMethods with parameters

Link to zenmethods-with-parameters