Package net.minecraft.world.level.border
Class WorldBorder
java.lang.Object
net.minecraft.world.level.border.WorldBorder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interfacestatic final record(package private) classstatic class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) intprivate doubleprivate doubleprivate doubleprivate doublestatic final WorldBorder.Settingsprivate WorldBorder.BorderExtentprivate final List<BorderChangeListener> static final doublestatic final doubleprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(BorderChangeListener pListener) voidapplySettings(WorldBorder.Settings pSerializer) clampToBounds(double pX, double pY, double pZ) clampToBounds(BlockPos pPos) clampToBounds(Vec3 pPos) clampVec3ToBound(double pX, double pY, double pZ) clampVec3ToBound(Vec3 pVec3) closestBorder(double pX, double pZ) intdoubledoubledoubledoubledoublegetDistanceToBorder(double pX, double pZ) doublegetDistanceToBorder(Entity pEntity) longdoubledoubleprotected List<BorderChangeListener> doublegetMaxX()doublegetMaxZ()doublegetMinX()doublegetMinZ()doublegetSize()intintbooleanisInsideCloseToBorder(Entity pEntity, AABB pBounds) booleanisWithinBounds(double pX, double pZ) booleanisWithinBounds(double pX, double pZ, double pOffset) private booleanisWithinBounds(double pX1, double pZ1, double pX2, double pZ2) booleanisWithinBounds(BlockPos pPos) booleanisWithinBounds(ChunkPos pChunkPos) booleanisWithinBounds(AABB pBox) booleanisWithinBounds(Vec3 pPos) voidlerpSizeBetween(double pOldSize, double pNewSize, long pTime) voidremoveListener(BorderChangeListener pListener) voidsetAbsoluteMaxSize(int pSize) voidsetCenter(double pX, double pZ) voidsetDamagePerBlock(double pDamagePerBlock) voidsetDamageSafeZone(double pDamageSafeZone) voidsetSize(double pSize) voidsetWarningBlocks(int pWarningDistance) voidsetWarningTime(int pWarningTime) voidtick()
-
Field Details
-
MAX_SIZE
public static final double MAX_SIZE- See Also:
-
MAX_CENTER_COORDINATE
public static final double MAX_CENTER_COORDINATE- See Also:
-
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
int absoluteMaxSize -
extent
-
DEFAULT_SETTINGS
-
-
Constructor Details
-
WorldBorder
public WorldBorder()
-
-
Method Details
-
isWithinBounds
-
isWithinBounds
-
isWithinBounds
-
isWithinBounds
-
isWithinBounds
private boolean isWithinBounds(double pX1, double pZ1, double pX2, double pZ2) -
isWithinBounds
public boolean isWithinBounds(double pX, double pZ) -
isWithinBounds
public boolean isWithinBounds(double pX, double pZ, double pOffset) -
clampToBounds
-
clampToBounds
-
clampToBounds
-
clampVec3ToBound
-
clampVec3ToBound
-
getDistanceToBorder
-
getCollisionShape
-
getDistanceToBorder
public double getDistanceToBorder(double pX, double pZ) -
closestBorder
-
isInsideCloseToBorder
-
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 pX, double pZ) -
getSize
public double getSize() -
getLerpRemainingTime
public long getLerpRemainingTime() -
getLerpTarget
public double getLerpTarget() -
setSize
public void setSize(double pSize) -
lerpSizeBetween
public void lerpSizeBetween(double pOldSize, double pNewSize, long pTime) -
getListeners
-
addListener
-
removeListener
-
setAbsoluteMaxSize
public void setAbsoluteMaxSize(int pSize) -
getAbsoluteMaxSize
public int getAbsoluteMaxSize() -
getDamageSafeZone
public double getDamageSafeZone() -
setDamageSafeZone
public void setDamageSafeZone(double pDamageSafeZone) -
getDamagePerBlock
public double getDamagePerBlock() -
setDamagePerBlock
public void setDamagePerBlock(double pDamagePerBlock) -
getLerpSpeed
public double getLerpSpeed() -
getWarningTime
public int getWarningTime() -
setWarningTime
public void setWarningTime(int pWarningTime) -
getWarningBlocks
public int getWarningBlocks() -
setWarningBlocks
public void setWarningBlocks(int pWarningDistance) -
tick
public void tick() -
createSettings
-
applySettings
-