Class WorldBorder
java.lang.Object
net.minecraft.world.level.saveddata.SavedData
net.minecraft.world.level.border.WorldBorder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceprivate classstatic final recordprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate doubleprivate doublestatic final com.mojang.serialization.Codec<WorldBorder> private doubleprivate WorldBorder.BorderExtentprivate booleanprivate final List<BorderChangeListener> static final doublestatic final doubleprivate doubleprivate final WorldBorder.Settingsstatic final SavedDataType<WorldBorder> private intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(BorderChangeListener listener) voidapplyInitialSettings(long gameTime) clampToBounds(double x, double y, double z) clampToBounds(BlockPos position) clampToBounds(Vec3 position) clampVec3ToBound(double x, double y, double z) clampVec3ToBound(Vec3 position) intdoubledoubledoubledoublegetDistanceToBorder(double x, double z) doublegetDistanceToBorder(Entity entity) doubledoublelongprotected List<BorderChangeListener> doublegetMaxX()doublegetMaxX(float deltaPartialTick) doublegetMaxZ()doublegetMaxZ(float deltaPartialTick) doublegetMinX()doublegetMinX(float deltaPartialTick) doublegetMinZ()doublegetMinZ(float deltaPartialTick) doubledoublegetSize()intintbooleanisInsideCloseToBorder(Entity source, AABB boundingBox) booleanisWithinBounds(double x, double z) booleanisWithinBounds(double x, double z, double margin) private booleanisWithinBounds(double minX, double minZ, double maxX, double maxZ) booleanisWithinBounds(BlockPos pos) booleanisWithinBounds(ChunkPos pos) booleanisWithinBounds(AABB aabb) booleanisWithinBounds(Vec3 pos) voidlerpSizeBetween(double from, double to, long ticks, long gameTime) voidremoveListener(BorderChangeListener listener) voidsetAbsoluteMaxSize(int absoluteMaxSize) voidsetCenter(double x, double z) voidsetDamagePerBlock(double damagePerBlock) voidsetSafeZone(double safeZone) voidsetSize(double size) voidsetWarningBlocks(int warningBlocks) voidsetWarningTime(int warningTime) 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:
-
CODEC
-
TYPE
-
settings
-
initialized
private boolean initialized -
listeners
-
damagePerBlock
private double damagePerBlock -
safeZone
private double safeZone -
warningTime
private int warningTime -
warningBlocks
private int warningBlocks -
centerX
private double centerX -
centerZ
private double centerZ -
absoluteMaxSize
private int absoluteMaxSize -
extent
-
-
Constructor Details
-
WorldBorder
public WorldBorder() -
WorldBorder
-
-
Method Details
-
isWithinBounds
-
isWithinBounds
-
isWithinBounds
-
isWithinBounds
-
isWithinBounds
private boolean isWithinBounds(double minX, double minZ, double maxX, double maxZ) -
isWithinBounds
public boolean isWithinBounds(double x, double z) -
isWithinBounds
public boolean isWithinBounds(double x, double z, double margin) -
clampToBounds
-
clampToBounds
-
clampToBounds
-
clampVec3ToBound
-
clampVec3ToBound
-
getDistanceToBorder
-
getCollisionShape
-
getDistanceToBorder
public double getDistanceToBorder(double x, double z) -
isInsideCloseToBorder
-
getStatus
-
getMinX
public double getMinX() -
getMinX
public double getMinX(float deltaPartialTick) -
getMinZ
public double getMinZ() -
getMinZ
public double getMinZ(float deltaPartialTick) -
getMaxX
public double getMaxX() -
getMaxX
public double getMaxX(float deltaPartialTick) -
getMaxZ
public double getMaxZ() -
getMaxZ
public double getMaxZ(float deltaPartialTick) -
getCenterX
public double getCenterX() -
getCenterZ
public double getCenterZ() -
setCenter
public void setCenter(double x, double z) -
getSize
public double getSize() -
getLerpTime
public long getLerpTime() -
getLerpTarget
public double getLerpTarget() -
setSize
public void setSize(double size) -
lerpSizeBetween
public void lerpSizeBetween(double from, double to, long ticks, long gameTime) -
getListeners
-
addListener
-
removeListener
-
setAbsoluteMaxSize
public void setAbsoluteMaxSize(int absoluteMaxSize) -
getAbsoluteMaxSize
public int getAbsoluteMaxSize() -
getSafeZone
public double getSafeZone() -
setSafeZone
public void setSafeZone(double safeZone) -
getDamagePerBlock
public double getDamagePerBlock() -
setDamagePerBlock
public void setDamagePerBlock(double damagePerBlock) -
getLerpSpeed
public double getLerpSpeed() -
getWarningTime
public int getWarningTime() -
setWarningTime
public void setWarningTime(int warningTime) -
getWarningBlocks
public int getWarningBlocks() -
setWarningBlocks
public void setWarningBlocks(int warningBlocks) -
tick
public void tick() -
applyInitialSettings
public void applyInitialSettings(long gameTime)
-