Package net.minecraft.world.border
Class WorldBorder
- java.lang.Object
-
- net.minecraft.world.border.WorldBorder
-
public class WorldBorder extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
WorldBorder.IBorderInfo
(package private) class
WorldBorder.MovingBorderInfo
static class
WorldBorder.Serializer
(package private) class
WorldBorder.StationaryBorderInfo
-
Field Summary
Fields Modifier and Type Field Description private int
absoluteMaxSize
private double
centerX
private double
centerZ
private double
damagePerBlock
private double
damageSafeZone
static WorldBorder.Serializer
DEFAULT_SETTINGS
private WorldBorder.IBorderInfo
extent
private java.util.List<IBorderListener>
listeners
private int
warningBlocks
private int
warningTime
-
Constructor Summary
Constructors Constructor Description WorldBorder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(IBorderListener p_177737_1_)
void
applySettings(WorldBorder.Serializer p_235926_1_)
WorldBorder.Serializer
createSettings()
int
getAbsoluteMaxSize()
double
getCenterX()
double
getCenterZ()
VoxelShape
getCollisionShape()
double
getDamagePerBlock()
double
getDamageSafeZone()
double
getDistanceToBorder(double p_177729_1_, double p_177729_3_)
double
getDistanceToBorder(Entity p_177745_1_)
long
getLerpRemainingTime()
double
getLerpSpeed()
double
getLerpTarget()
protected java.util.List<IBorderListener>
getListeners()
double
getMaxX()
double
getMaxZ()
double
getMinX()
double
getMinZ()
double
getSize()
BorderStatus
getStatus()
int
getWarningBlocks()
int
getWarningTime()
boolean
isWithinBounds(AxisAlignedBB p_177743_1_)
boolean
isWithinBounds(BlockPos p_177746_1_)
boolean
isWithinBounds(ChunkPos p_177730_1_)
void
lerpSizeBetween(double p_177738_1_, double p_177738_3_, long p_177738_5_)
void
removeListener(IBorderListener listener)
void
setAbsoluteMaxSize(int p_177725_1_)
void
setCenter(double p_177739_1_, double p_177739_3_)
void
setDamagePerBlock(double p_177744_1_)
void
setDamageSafeZone(double p_177724_1_)
void
setSize(double p_177750_1_)
void
setWarningBlocks(int p_177747_1_)
void
setWarningTime(int p_177723_1_)
void
tick()
-
-
-
Field Detail
-
listeners
private final java.util.List<IBorderListener> listeners
-
damagePerBlock
private double damagePerBlock
-
damageSafeZone
private double damageSafeZone
-
warningTime
private int warningTime
-
warningBlocks
private int warningBlocks
-
centerX
private double centerX
-
centerZ
private double centerZ
-
absoluteMaxSize
private int absoluteMaxSize
-
extent
private WorldBorder.IBorderInfo extent
-
DEFAULT_SETTINGS
public static final WorldBorder.Serializer DEFAULT_SETTINGS
-
-
Method Detail
-
isWithinBounds
public boolean isWithinBounds(BlockPos p_177746_1_)
-
isWithinBounds
public boolean isWithinBounds(ChunkPos p_177730_1_)
-
isWithinBounds
public boolean isWithinBounds(AxisAlignedBB p_177743_1_)
-
getDistanceToBorder
public double getDistanceToBorder(Entity p_177745_1_)
-
getCollisionShape
public VoxelShape getCollisionShape()
-
getDistanceToBorder
public double getDistanceToBorder(double p_177729_1_, double p_177729_3_)
-
getStatus
public BorderStatus getStatus()
-
getMinX
public double getMinX()
-
getMinZ
public double getMinZ()
-
getMaxX
public double getMaxX()
-
getMaxZ
public double getMaxZ()
-
getCenterX
public double getCenterX()
-
getCenterZ
public double getCenterZ()
-
setCenter
public void setCenter(double p_177739_1_, double p_177739_3_)
-
getSize
public double getSize()
-
getLerpRemainingTime
public long getLerpRemainingTime()
-
getLerpTarget
public double getLerpTarget()
-
setSize
public void setSize(double p_177750_1_)
-
lerpSizeBetween
public void lerpSizeBetween(double p_177738_1_, double p_177738_3_, long p_177738_5_)
-
getListeners
protected java.util.List<IBorderListener> getListeners()
-
addListener
public void addListener(IBorderListener p_177737_1_)
-
removeListener
public void removeListener(IBorderListener listener)
-
setAbsoluteMaxSize
public void setAbsoluteMaxSize(int p_177725_1_)
-
getAbsoluteMaxSize
public int getAbsoluteMaxSize()
-
getDamageSafeZone
public double getDamageSafeZone()
-
setDamageSafeZone
public void setDamageSafeZone(double p_177724_1_)
-
getDamagePerBlock
public double getDamagePerBlock()
-
setDamagePerBlock
public void setDamagePerBlock(double p_177744_1_)
-
getLerpSpeed
public double getLerpSpeed()
-
getWarningTime
public int getWarningTime()
-
setWarningTime
public void setWarningTime(int p_177723_1_)
-
getWarningBlocks
public int getWarningBlocks()
-
setWarningBlocks
public void setWarningBlocks(int p_177747_1_)
-
tick
public void tick()
-
createSettings
public WorldBorder.Serializer createSettings()
-
applySettings
public void applySettings(WorldBorder.Serializer p_235926_1_)
-
-