Class WorldBorder

java.lang.Object
net.minecraft.world.level.saveddata.SavedData
net.minecraft.world.level.border.WorldBorder

public class WorldBorder extends SavedData
  • 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

      public static final com.mojang.serialization.Codec<WorldBorder> CODEC
    • TYPE

      public static final SavedDataType<WorldBorder> TYPE
    • settings

      private final WorldBorder.Settings settings
    • initialized

      private boolean initialized
    • listeners

      private final List<BorderChangeListener> 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

      private WorldBorder.BorderExtent extent
  • Constructor Details

  • Method Details

    • isWithinBounds

      public boolean isWithinBounds(BlockPos pos)
    • isWithinBounds

      public boolean isWithinBounds(Vec3 pos)
    • isWithinBounds

      public boolean isWithinBounds(ChunkPos pos)
    • isWithinBounds

      public boolean isWithinBounds(AABB aabb)
    • 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

      public BlockPos clampToBounds(BlockPos position)
    • clampToBounds

      public BlockPos clampToBounds(Vec3 position)
    • clampToBounds

      public BlockPos clampToBounds(double x, double y, double z)
    • clampVec3ToBound

      public Vec3 clampVec3ToBound(Vec3 position)
    • clampVec3ToBound

      public Vec3 clampVec3ToBound(double x, double y, double z)
    • getDistanceToBorder

      public double getDistanceToBorder(Entity entity)
    • getCollisionShape

      public VoxelShape getCollisionShape()
    • getDistanceToBorder

      public double getDistanceToBorder(double x, double z)
    • isInsideCloseToBorder

      public boolean isInsideCloseToBorder(Entity source, AABB boundingBox)
    • getStatus

      public BorderStatus 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

      protected List<BorderChangeListener> getListeners()
    • addListener

      public void addListener(BorderChangeListener listener)
    • removeListener

      public void removeListener(BorderChangeListener listener)
    • 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)