Package org.geysermc.geyser.entity.type
Class BoatEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.BoatEntity
- All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity,Leashable,Tickable,ClientVehicle
- 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
bedrockDefinition, customName, customNameVisible, dirtyMetadata, entityId, flags, geyserId, headYaw, javaTypeDefinition, metadata, motion, nametag, offset, onGround, passengers, pitch, position, propertyManager, scale, session, silent, uuid, valid, vehicle, yaw -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.cloudburstmc.math.vector.Vector3fgetRiddenInput(org.cloudburstmc.math.vector.Vector2f input) Saved for using the "pick" functionality on a boat.floatprotected voidCalled on entity spawn.interact(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand) Simulates interacting with an entity.longvoidmoveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) voidmoveRelativeRaw(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) booleanprotected 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, applyScale, bedrockDefinition, bedrockDefinition, bedrockPosition, bedrockRotation, definition, despawnEntity, doesJumpDismount, getBoundingBoxHeight, getBoundingBoxWidth, getCustomBoundingBoxHeight, getCustomBoundingBoxWidth, getDirtyMetadata, getDisplayName, getEntityId, getFlag, getHeadYaw, getJavaTypeDefinition, getMaxAir, getMetadata, getMotion, getNametag, getOffset, getPassengers, getPitch, getPosition, getPropertyManager, getScale, getSession, getVehicle, getYaw, geyserId, hasLeashesToDrop, interactAt, isAlive, isCustomNameVisible, isOnGround, isShaking, isSilent, isValid, javaId, moveAbsolute, moveAbsolute, moveRelative, offset, playEntityEvent, playEntityEvent, position, scoreVisibility, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setClientSideSilent, setCustomBoundingBoxHeight, setCustomBoundingBoxWidth, setCustomName, setCustomNameVisible, setDimensionsFromPose, setEntityId, setFlag, setFlags, setFlagsDirty, setFreezing, setGliding, setGravity, setHeadYaw, setInvisible, setJavaTypeDefinition, setMotion, setNameEntityData, setNametag, setNametagAlwaysShow, setOffset, setOnGround, setPassengers, setPitch, setPose, setPosition, setRiderSeatPosition, setScale, setSilent, setSneaking, setSprinting, setValid, setVehicle, setYaw, spawnEntity, standardDisplayName, teamIdentifier, teleport, update, updateBedrockEntityProperties, updateBedrockMetadata, updateHeadLookRotation, updateInteractiveTag, updateMountOffset, updateNametag, updateNametag, updatePassengerOffsets, updatePropertiesBatched, uuid, uuid, valueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.geyser.entity.vehicle.ClientVehicle
canClimb, canWalkOnLavaMethods 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
-
-
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
-
moveAbsoluteRaw
public void moveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) - Overrides:
moveAbsoluteRawin classEntity
-
moveRelativeRaw
public void moveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround) - Overrides:
moveRelativeRawin 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
-
getVehicleComponent
- Specified by:
getVehicleComponentin interfaceClientVehicle
-
getRiddenInput
public org.cloudburstmc.math.vector.Vector3f getRiddenInput(org.cloudburstmc.math.vector.Vector2f input) - Specified by:
getRiddenInputin interfaceClientVehicle
-
getVehicleSpeed
public float getVehicleSpeed()- Specified by:
getVehicleSpeedin interfaceClientVehicle
-
shouldSimulateMovement
public boolean shouldSimulateMovement()- Specified by:
shouldSimulateMovementin interfaceClientVehicle
-
getVariant
Saved for using the "pick" functionality on a boat.
-