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

public class MinecartEntity extends Entity implements Tickable
  • 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:
      moveAbsolute in class Entity
    • moveRelative

      public void moveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
      Overrides:
      moveRelative in class Entity
    • tick

      public void tick()
      Description copied from interface: Tickable
      This function gets called every game tick as long as the game tick loop isn't frozen.
      Specified by:
      tick in interface Tickable
    • 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:
      moveAbsoluteRaw in class Entity
    • getBedrockRotation

      public org.cloudburstmc.math.vector.Vector3f getBedrockRotation()
      Description copied from class: Entity
      x = Pitch, y = Yaw, z = HeadYaw
      Overrides:
      getBedrockRotation in class Entity
      Returns:
      the bedrock rotation
    • doesJumpDismount

      public boolean doesJumpDismount()
      Description copied from class: Entity
      If true, the entity can be dismounted by pressing jump.
      Overrides:
      doesJumpDismount in class Entity
      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: Entity
      Test interacting with the given hand to see if we should send a tag to the Bedrock client. Should usually mirror Entity.interact(Hand) without any side effects.
      Overrides:
      testInteraction in class Entity
    • interact

      public InteractionResult interact(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand)
      Description copied from class: Entity
      Simulates 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).
      Overrides:
      interact in class Entity
    • lerp

      public static double lerp(double delta, double start, double end)