Package org.geysermc.geyser.entity.type
Class FishingHookEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.ProjectileEntity
org.geysermc.geyser.entity.type.FishingHookEntity
- All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity,Tickable
-
Field Summary
Fields inherited from class org.geysermc.geyser.entity.type.ProjectileEntity
lastJavaPositionFields inherited from class org.geysermc.geyser.entity.type.Entity
bedrockDefinition, customName, customNameVisible, entityId, flags, geyserId, headYaw, javaDefinition, metadata, motion, nametag, onGround, passengers, pitch, position, propertyManager, scale, session, silent, uuid, valid, vehicle, yaw -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDespawns the entitylonglongprotected floatgetDrag()protected floatGet the gravity of this entity type.protected booleanisInAir()voidCalled when the Bedrock client uses its rod while this hook is out.protected voidmoveAbsoluteImmediate(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) voidmoveAbsoluteRaw(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) voidsetHookedEntity(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) voidtick()Updates the position for the Bedrock client.Methods inherited from class org.geysermc.geyser.entity.type.ProjectileEntity
isInWater, removedInVoidMethods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, applyScale, bedrockDefinition, bedrockDefinition, bedrockPosition, bedrockRotation, definition, doesJumpDismount, getBoundingBoxHeight, getBoundingBoxWidth, getDisplayName, getEntityId, getEntityType, getFlag, getHeadYaw, getJavaDefinition, getMaxAir, getMetadata, getMotion, getNametag, getOffset, getOffsetOverride, getPassengers, getPitch, getPosition, getPropertyManager, getScale, getSession, getVehicle, getYaw, geyserId, hasLeashesToDrop, initializeMetadata, interact, interactAt, isAlive, isCustomNameVisible, isOnGround, isShaking, isSilent, isValid, javaId, moveAbsolute, moveAbsolute, moveRelative, override, override, passengers, playEntityEvent, playEntityEvent, position, scoreVisibility, sendSpectateInvisible, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setClientSideSilent, setCustomName, setCustomNameVisible, setDimensionsFromPose, setEntityId, setFlag, setFlags, setFlagsDirty, setFreezing, setGliding, setGravity, setHeadYaw, setInvisible, setJavaDefinition, setMotion, setNameEntityData, setNametag, setNametagAlwaysShow, setOffset, setOffsetOverride, setOnGround, setPassengers, setPitch, setPose, setPosition, setRiderSeatPosition, setScale, setSilent, setSneaking, setSprinting, setValid, setVehicle, setYaw, spawnEntity, spawnPosition, spectateHiddenFlags, standardDisplayName, teamIdentifier, teleport, testInteraction, updateBedrockEntityProperties, updateBedrockMetadata, updateHeadLookRotation, updateInteractiveTag, updateMountOffset, updateNametag, updateNametag, updatePassengerOffsets, updatePositionAndRotation, updatePropertiesBatched, updateRotation, uuid, uuid, value, vehicleMethods 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, updateProperty
-
Constructor Details
-
FishingHookEntity
-
-
Method Details
-
despawnEntity
public void despawnEntity()Description copied from class:EntityDespawns the entity- Overrides:
despawnEntityin classProjectileEntity
-
markRetrievedByClient
public void markRetrievedByClient()Called when the Bedrock client uses its rod while this hook is out. The client removes its own hook right away and assumes the retrieve succeeds. When a plugin cancels the retrieve, Java keeps the hook and never sends anything that brings it back, so the hook is respawned on the next movement Java sends for it. A hook at rest only gets Java's periodic position sync, so that can take up to three seconds. Geyser's own projectile ticking must not trigger the respawn, since a successful retrieve's removal can still be in flight. -
moveRelativeRaw
public void moveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround) - Overrides:
moveRelativeRawin classProjectileEntity
-
moveAbsoluteRaw
public void moveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) - Overrides:
moveAbsoluteRawin classProjectileEntity
-
setHookedEntity
public void setHookedEntity(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) -
moveAbsoluteImmediate
protected void moveAbsoluteImmediate(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) - Overrides:
moveAbsoluteImmediatein classProjectileEntity
-
tick
public void tick()Description copied from class:ProjectileEntityUpdates the position for the Bedrock client. Java clients assume the next positions of moving items. Bedrock needs to be explicitly told positions- Specified by:
tickin interfaceTickable- Overrides:
tickin classProjectileEntity
-
getGravity
protected float getGravity()Description copied from class:ProjectileEntityGet the gravity of this entity type. Used for applying gravity while the entity is in motion.- Overrides:
getGravityin classProjectileEntity- Returns:
- the amount of gravity to apply to this entity while in motion.
-
isInAir
protected boolean isInAir()- Returns:
- true if this entity is currently in air.
-
getDrag
protected float getDrag()- Overrides:
getDragin classProjectileEntity- Returns:
- the drag that should be multiplied to the entity's motion
-
getBedrockOwnerId
public long getBedrockOwnerId() -
getBedrockTargetId
public long getBedrockTargetId()
-