Class WorldBorder
java.lang.Object
org.geysermc.geyser.session.cache.WorldBorder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawWall()Draws a wall of particles where the world border residesbooleanbooleanbooleanisInsideBorderBoundaries(com.nukkitx.math.vector.Vector3f position)booleanisPassingIntoBorderBoundaries(com.nukkitx.math.vector.Vector3f newEntityPosition)booleanisPassingIntoBorderBoundaries(com.nukkitx.math.vector.Vector3f newPosition, boolean adjustPosition)Confirms that the entity is within world border boundaries when they move.booleanSame asisInsideBorderBoundaries()but using the warning boundaries.voidresize()voidsetResizing(boolean resizing)voidsetWorldCoordinateScale(double worldCoordinateScale)voidupdate()Updates the world border's minimum and maximum properties
-
Constructor Details
-
WorldBorder
-
-
Method Details
-
setWorldCoordinateScale
public void setWorldCoordinateScale(double worldCoordinateScale) -
isInsideBorderBoundaries
public boolean isInsideBorderBoundaries()- Returns:
- true as long as the player entity is within the world limits.
-
isInsideBorderBoundaries
public boolean isInsideBorderBoundaries(com.nukkitx.math.vector.Vector3f position) -
isCloseToBorderBoundaries
public boolean isCloseToBorderBoundaries()- Returns:
- if the player is close to the border boundaries. Used to always indicate a border even if there is no warning blocks set.
-
isPassingIntoBorderBoundaries
public boolean isPassingIntoBorderBoundaries(com.nukkitx.math.vector.Vector3f newPosition, boolean adjustPosition)Confirms that the entity is within world border boundaries when they move. Otherwise, ifadjustPositionis true, this function will push the player back.- Returns:
- if this player was indeed against the world border. Will return false if no world border was defined for us.
-
isPassingIntoBorderBoundaries
public boolean isPassingIntoBorderBoundaries(com.nukkitx.math.vector.Vector3f newEntityPosition) -
isWithinWarningBoundaries
public boolean isWithinWarningBoundaries()Same asisInsideBorderBoundaries()but using the warning boundaries.- Returns:
- true as long the entity is within the world limits and not in the warning zone at the edge to the border.
-
update
public void update()Updates the world border's minimum and maximum properties -
resize
public void resize() -
setResizing
public void setResizing(boolean resizing) -
drawWall
public void drawWall()Draws a wall of particles where the world border resides
-