Class PistonCache
java.lang.Object
org.geysermc.geyser.session.cache.PistonCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckCollision(com.nukkitx.math.vector.Vector3i blockPos, BoundingBox boundingBox)voidclear()doublecomputeCollisionOffset(com.nukkitx.math.vector.Vector3i blockPos, BoundingBox boundingBox, Axis axis, double offset)voiddisplacePlayer(com.nukkitx.math.vector.Vector3d displacement)Add to the player's displacement and move the player's bounding box The total displacement is capped to a range of -0.51 to 0.51 per tickvoidtick()
-
Constructor Details
-
PistonCache
-
-
Method Details
-
tick
public void tick() -
displacePlayer
public void displacePlayer(com.nukkitx.math.vector.Vector3d displacement)Add to the player's displacement and move the player's bounding box The total displacement is capped to a range of -0.51 to 0.51 per tick- Parameters:
displacement- The displacement to apply to the player's bounding box
-
computeCollisionOffset
public double computeCollisionOffset(com.nukkitx.math.vector.Vector3i blockPos, BoundingBox boundingBox, Axis axis, double offset)- Parameters:
blockPos- The block position to testboundingBox- The bounding box that movesaxis- The axis to apply the offsetoffset- The current maximum distance the bounding box can travel- Returns:
- The new maximum distance the bounding box can travel without colliding with the tested moving block
-
checkCollision
-
clear
public void clear()
-