Package org.geysermc.geyser.entity.type
Class BoatEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.BoatEntity
- Direct Known Subclasses:
ChestBoatEntity
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BoatEntity.BoatVariantSaved for using the "pick" functionality on a boat.Fields inherited from class org.geysermc.geyser.entity.type.Entity
definition, dirtyMetadata, displayName, entityId, flags, geyserId, headYaw, motion, nametag, onGround, passengers, pitch, position, propertyManager, session, silent, uuid, valid, vehicle, yaw -
Constructor Summary
ConstructorsConstructorDescriptionBoatEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, BoatEntity.BoatVariant variant) -
Method Summary
Modifier and TypeMethodDescriptionSaved for using the "pick" functionality on a boat.protected voidCalled on entity spawn.interact(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand) Simulates interacting with an entity.longvoidmoveAbsolute(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) voidmoveAbsoluteWithoutAdjustments(org.cloudburstmc.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) voidsetLeashHolderBedrockId(long bedrockId) voidsetPaddlingLeft(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) voidsetPaddlingRight(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) protected InteractiveTagtestInteraction(org.geysermc.mcprotocollib.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.voidtick()This function gets called every game tick as long as the game tick loop isn't frozen.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, despawnEntity, doesJumpDismount, getBedrockRotation, getBoundingBoxHeight, getBoundingBoxWidth, getDefinition, getDirtyMetadata, getDisplayName, getEntityId, getFlag, getGeyserId, getHeadYaw, getMaxAir, getMotion, getNametag, getPassengers, getPitch, getPosition, getPropertyManager, getSession, getUuid, getVehicle, getYaw, hasLeashesToDrop, interactAt, isAlive, isOnGround, isShaking, isSilent, isValid, javaId, moveAbsolute, moveRelative, playEntityEvent, playEntityEvent, scoreVisibility, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setClientSideSilent, setDefinition, setDimensionsFromPose, setDisplayName, setDisplayNameVisible, setEntityId, setFlag, setFlags, setFlagsDirty, setFreezing, setGliding, setGravity, setHeadYaw, setInvisible, setMotion, setNametag, setOnGround, setPassengers, setPitch, setPose, setPosition, setRiderSeatPosition, setSilent, setSneaking, setSprinting, setUuid, setValid, setVehicle, setYaw, spawnEntity, standardDisplayName, teamIdentifier, teleport, updateBedrockEntityProperties, updateBedrockMetadata, updateHeadLookRotation, updateInteractiveTag, updateMountOffset, updateNametag, updateNametag, updatePassengerOffsets, updatePropertiesBatchedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.geyser.api.entity.type.GeyserEntity
updatePropertiesBatched, updatePropertyMethods inherited from interface org.geysermc.geyser.entity.type.Leashable
canBeLeashed, isLeashed
-
Field Details
-
variant
Saved for using the "pick" functionality on a boat.
-
-
Constructor Details
-
BoatEntity
public BoatEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, BoatEntity.BoatVariant variant)
-
-
Method Details
-
initializeMetadata
protected void initializeMetadata()Description copied from class:EntityCalled on entity spawn. Used to populate the entity metadata and flags with default values.- Overrides:
initializeMetadatain classEntity
-
moveAbsolute
public void moveAbsolute(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) - Overrides:
moveAbsolutein classEntity
-
moveAbsoluteWithoutAdjustments
public void moveAbsoluteWithoutAdjustments(org.cloudburstmc.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.
-
setPaddlingLeft
public void setPaddlingLeft(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) -
setPaddlingRight
public void setPaddlingRight(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) -
setLeashHolderBedrockId
public void setLeashHolderBedrockId(long bedrockId) - Specified by:
setLeashHolderBedrockIdin interfaceLeashable
-
testInteraction
protected InteractiveTag testInteraction(org.geysermc.mcprotocollib.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(org.geysermc.mcprotocollib.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). -
tick
public void tick()Description copied from interface:TickableThis function gets called every game tick as long as the game tick loop isn't frozen. -
leashHolderBedrockId
public long leashHolderBedrockId()- Specified by:
leashHolderBedrockIdin interfaceLeashable
-
getVariant
Saved for using the "pick" functionality on a boat.
-