public class WorldBorder extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
WorldBorder.Area |
(package private) class |
WorldBorder.MovingArea |
static class |
WorldBorder.Properties |
(package private) class |
WorldBorder.StaticArea |
Modifier and Type | Field and Description |
---|---|
private WorldBorder.Area |
area |
private double |
buffer |
private double |
centerX |
private double |
centerZ |
private double |
damagePerBlock |
static WorldBorder.Properties |
DEFAULT_BORDER |
private List<WorldBorderListener> |
listeners |
private int |
maxWorldBorderRadius |
private int |
warningBlocks |
private int |
warningTime |
Constructor and Description |
---|
WorldBorder() |
public static final WorldBorder.Properties DEFAULT_BORDER
private final List<WorldBorderListener> listeners
private double damagePerBlock
private double buffer
private int warningTime
private int warningBlocks
private double centerX
private double centerZ
private int maxWorldBorderRadius
private WorldBorder.Area area
public boolean contains(BlockPos pos)
public boolean contains(ChunkPos pos)
public boolean contains(Box box)
public double getDistanceInsideBorder(Entity entity)
public VoxelShape asVoxelShape()
public double getDistanceInsideBorder(double x, double z)
@Environment(value=CLIENT) public WorldBorderStage getStage()
public double getBoundWest()
public double getBoundNorth()
public double getBoundEast()
public double getBoundSouth()
public double getCenterX()
public double getCenterZ()
public void setCenter(double x, double z)
public double getSize()
public long getTargetRemainingTime()
public double getTargetSize()
public void setSize(double size)
public void interpolateSize(double fromSize, double toSize, long time)
protected List<WorldBorderListener> getListeners()
public void addListener(WorldBorderListener listener)
public void setMaxWorldBorderRadius(int radius)
public int getMaxWorldBorderRadius()
public double getBuffer()
public void setBuffer(double buffer)
public double getDamagePerBlock()
public void setDamagePerBlock(double damagePerBlock)
@Environment(value=CLIENT) public double getShrinkingSpeed()
public int getWarningTime()
public void setWarningTime(int warningTime)
public int getWarningBlocks()
public void setWarningBlocks(int warningBlocks)
public void tick()
public WorldBorder.Properties write()
public void load(WorldBorder.Properties properties)