ZenUtilsWorld - friendlyhj/ZenUtils GitHub Wiki

ZenUtilsWorld

ZenUtilsWorld is an expansion of IWorld (crafttweaker.world.IWorld).

Calling the methods

As this is a ZenExpansion, you can simply call the methods on any IWorld object, or any of it's subtypes.

ZenMethods

Warning : If not find player, these methods will return null.

worldObj.getPlayerByName(String name); // return IPlayer
worldObj.getPlayerByUUID(CrTUUID uuid); // return IPlayer
worldObj.getAllPlayers(); // return List<IPlayer>
worldObj.getClosestPlayerToEntity(IEntity iEntity, double distance, boolean spectator); // return IPlayer
worldObj.getClosestPlayer(double posX, double posY, double posZ, double distance, boolean spectator); // return IPlayer
worldObj.getEntities(); // return List<IEntity>
worldObj.getEntityItems(); // return List<IEntityItem>

// @since 1.4.4
// get/set/update custom world saved data
// different dimesion has different data
worldObj.getCustomWorldData(); // return IData, @Nonnull
worldObj.setCustomWorldData(IData data); // return nothing
worldObj.updateCustomWorldData(IData data); // return nothing

// get/set/update custom chunk saved data
// the IBlockPos argument is to get chunk it is in
// you will get data in the chunk, not on the block pos
worldObj.getCustomChunkData(IBlockPos posToGetChunk); // return IData, @Nonnull
worldObj.setCustomChunkData(IData data, IBlockPos posToGetChunk); // return nothing
worldObj.updateCustomChunkData(IData data, IBlockPos posToGetchunk); // return nothing

// @since 1.5.2
worldObj.destroyBlock(IBlockPos pos, bool dropBlock);
⚠️ **GitHub.com Fallback** ⚠️