Package org.geysermc.geyser.entity.type
Class MinecartEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.MinecartEntity
- All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity,Tickable
- Direct Known Subclasses:
DefaultBlockMinecartEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanFields 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
ConstructorsConstructorDescriptionMinecartEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, float pitch, float headYaw) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf true, the entity can be dismounted by pressing jump.org.cloudburstmc.math.vector.Vector3fx = Pitch, y = Yaw, z = HeadYawvoidhandleMinecartMovePacket(org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.ClientboundMoveMinecartPacket packet) interact(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand) Simulates interacting with an entity.static doublelerp(double delta, double start, double end) voidmoveAbsolute(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) voidmoveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround) voidsetCustomBlock(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) voidsetCustomBlockOffset(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata 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.Methods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, despawnEntity, getBoundingBoxHeight, getBoundingBoxWidth, getDefinition, getDirtyMetadata, getDisplayName, getEntityId, getFlag, getGeyserId, getHeadYaw, getMaxAir, getMotion, getNametag, getPassengers, getPitch, getPosition, getPropertyManager, getSession, getUuid, getVehicle, getYaw, hasLeashesToDrop, initializeMetadata, interactAt, isAlive, isOnGround, isShaking, isSilent, isValid, javaId, moveAbsolute, moveRelativeRaw, 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, updatePositionAndRotation, updatePropertiesBatched, updateRotationMethods 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
-
Field Details
-
dirtyYaw
protected boolean dirtyYaw -
dirtyHeadYaw
protected boolean dirtyHeadYaw -
dirtyPitch
protected boolean dirtyPitch
-
-
Constructor Details
-
MinecartEntity
public MinecartEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, float pitch, float headYaw)
-
-
Method Details
-
setCustomBlock
public void setCustomBlock(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) -
setCustomBlockOffset
public void setCustomBlockOffset(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) -
moveAbsolute
public void moveAbsolute(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) - Overrides:
moveAbsolutein classEntity
-
moveRelative
public void moveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround) - Overrides:
moveRelativein classEntity
-
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. -
handleMinecartMovePacket
public void handleMinecartMovePacket(org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.ClientboundMoveMinecartPacket packet) -
moveAbsoluteRaw
public void moveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) - Overrides:
moveAbsoluteRawin classEntity
-
getBedrockRotation
public org.cloudburstmc.math.vector.Vector3f getBedrockRotation()Description copied from class:Entityx = Pitch, y = Yaw, z = HeadYaw- Overrides:
getBedrockRotationin classEntity- Returns:
- the bedrock rotation
-
doesJumpDismount
public boolean doesJumpDismount()Description copied from class:EntityIf true, the entity can be dismounted by pressing jump.- Overrides:
doesJumpDismountin classEntity- Returns:
- whether the entity can be dismounted when pressing jump.
-
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). -
lerp
public static double lerp(double delta, double start, double end)
-