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
Fields inherited from class org.geysermc.geyser.entity.type.Entity
definition, dirtyMetadata, 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 TypeMethodDescriptionorg.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) 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, moveRelative, 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, updatePositionAndRotation, updateRotation
-
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) -
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) -
moveAbsolute
public void moveAbsolute(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) - Overrides:
moveAbsolutein 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
-
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)
-