Package org.geysermc.geyser.entity.type
Class BoatEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.BoatEntity
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBoatEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, float yaw, float pitch, float headYaw) -
Method Summary
Modifier and TypeMethodDescriptioninteract(com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand)Simulates interacting with an entity.voidmoveAbsolute(com.nukkitx.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)voidmoveAbsoluteWithoutAdjustments(com.nukkitx.math.vector.Vector3f position, float yaw, boolean isOnGround, boolean teleported)Move the boat without making the adjustments needed to translate from JavavoidmoveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)voidsetPaddlingLeft(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)voidsetPaddlingRight(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)voidsetVariant(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)protected InteractiveTagtestInteraction(com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand)Test interacting with the given hand to see if we should send a tag to the Bedrock client.voidupdatePositionAndRotation(double moveX, double moveY, double moveZ, float yaw, float pitch, boolean isOnGround)Updates an entity's position and rotation.voidupdateRotation(float yaw, float pitch, boolean isOnGround)Updates an entity's rotation.Methods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, as, despawnEntity, getBedrockRotation, getFlag, getMaxAir, initializeMetadata, interactAt, isAlive, isShaking, moveAbsolute, moveRelative, playEntityEvent, playEntityEvent, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setDimensions, setDisplayName, setDisplayNameVisible, setFlag, setFlags, setFreezing, setGravity, setInvisible, setPose, setRiderSeatPosition, spawnEntity, teleport, updateBedrockMetadata, updateHeadLookRotation, updateInteractiveTag, updateMountOffset, updatePassengerOffsets
-
Constructor Details
-
BoatEntity
public BoatEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, float yaw, float pitch, float headYaw)
-
-
Method Details
-
moveAbsolute
public void moveAbsolute(com.nukkitx.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)- Overrides:
moveAbsolutein classEntity
-
moveAbsoluteWithoutAdjustments
public void moveAbsoluteWithoutAdjustments(com.nukkitx.math.vector.Vector3f position, float yaw, boolean isOnGround, boolean teleported)Move the boat without making the adjustments needed to translate from Java -
moveRelative
public void moveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)- Overrides:
moveRelativein classEntity
-
updatePositionAndRotation
public void updatePositionAndRotation(double moveX, double moveY, double moveZ, float yaw, float pitch, boolean isOnGround)Description copied from class:EntityUpdates an entity's position and rotation. Used in JavaMoveEntityPosRotTranslator.- Overrides:
updatePositionAndRotationin classEntity- Parameters:
moveX- The new X offset of the current position.moveY- The new Y offset of the current position.moveZ- The new Z offset of the current position.yaw- The new yaw of the entity.pitch- The new pitch of the entity.isOnGround- Whether the entity is currently on the ground.
-
updateRotation
public void updateRotation(float yaw, float pitch, boolean isOnGround)Description copied from class:EntityUpdates an entity's rotation. Used in JavaMoveEntityRotTranslator.- Overrides:
updateRotationin classEntity- Parameters:
yaw- The new yaw of the entity.pitch- The new pitch of the entity.isOnGround- Whether the entity is currently on the ground.
-
setVariant
public void setVariant(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) -
setPaddlingLeft
public void setPaddlingLeft(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) -
setPaddlingRight
public void setPaddlingRight(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) -
testInteraction
protected InteractiveTag testInteraction(com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand)Description copied from class:EntityTest interacting with the given hand to see if we should send a tag to the Bedrock client. Should usually mirrorEntity.interact(Hand)without any side effects.- Overrides:
testInteractionin classEntity
-
interact
public InteractionResult interact(com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand)Description copied from class:EntitySimulates interacting with an entity. The code here should mirror Java Edition code to the best of its ability, to ensure packet parity as well as functionality parity (such as sound effect responses).
-