public class CompensatedWorld extends World
Modifier and Type | Field and Description |
---|---|
protected Player |
p |
protected World |
serverWorld |
protected List<BlockTransition> |
transitions |
content, emptyBlock
Constructor and Description |
---|
CompensatedWorld(Player p) |
CompensatedWorld(Player p,
World w) |
Modifier and Type | Method and Description |
---|---|
void |
addTimingBlock(long expireTime,
Material next,
int x,
int y,
int z) |
Block |
getBlockAt0(int x,
int y,
int z)
Get the block at the specified location on this world
Return a block with AIR type if not found
Can create error if world not loaded AND loading it async Load directly from world |
Object |
getDefault()
Get default object which is abstracted by Negativity structure.
|
Difficulty |
getDifficulty()
Get the world difficulty
|
List<Entity> |
getEntities() |
Optional<Entity> |
getEntityById(int id) |
int |
getMaxHeight()
Get the max height of the world
|
int |
getMinHeight()
Get the min height of the world
|
String |
getName()
Get the world name
|
Player |
getPlayer() |
protected World |
getServerWorld() |
boolean |
isChunkLoaded(int chunkX,
int chunkZ) |
String |
toString() |
equals, getBlockAt, getBlockAt, getBlockAt, getBlockAt, getBlockAt0, getWorld, getWorld, getWorlds, isChunkLoaded
protected final Player p
protected World serverWorld
protected List<BlockTransition> transitions
public CompensatedWorld(Player p)
public Player getPlayer()
protected World getServerWorld()
public Block getBlockAt0(int x, int y, int z)
World
getBlockAt0
in class World
x
- The X block locationy
- The Y block locationz
- The Z block locationpublic void addTimingBlock(long expireTime, Material next, int x, int y, int z)
public List<Entity> getEntities()
getEntities
in class World
public Optional<Entity> getEntityById(int id)
getEntityById
in class World
public Difficulty getDifficulty()
World
getDifficulty
in class World
public int getMaxHeight()
World
getMaxHeight
in class World
public int getMinHeight()
World
getMinHeight
in class World
public Object getDefault()
NegativityObject
For example, when we use World
, beside there is the Spigot/Sponge... world.
We can get the default platform object, in the example, the platform world.
public boolean isChunkLoaded(int chunkX, int chunkZ)
isChunkLoaded
in class World