All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity, Leashable, Tickable, ClientVehicle

public class PigEntity extends AnimalEntity implements Tickable, ClientVehicle
  • Constructor Details

    • PigEntity

      public PigEntity(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

    • getFoodTag

      protected @Nullable Tag<Item> getFoodTag()
      Specified by:
      getFoodTag in class AnimalEntity
      Returns:
      the tag associated with this animal for eating food. Null for nothing or different behavior.
    • testMobInteraction

      protected @NonNull InteractiveTag testMobInteraction(@NonNull org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand)
      Overrides:
      testMobInteraction in class AnimalEntity
    • mobInteract

      protected @NonNull InteractionResult mobInteract(@NonNull org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand)
      Overrides:
      mobInteract in class AnimalEntity
    • setBoost

      public void setBoost(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)
    • 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
    • getVehicleComponent

      public VehicleComponent<?> getVehicleComponent()
      Specified by:
      getVehicleComponent in interface ClientVehicle
    • getAdjustedInput

      public org.cloudburstmc.math.vector.Vector2f getAdjustedInput(org.cloudburstmc.math.vector.Vector2f input)
      Specified by:
      getAdjustedInput in interface ClientVehicle
    • getVehicleSpeed

      public float getVehicleSpeed()
      Specified by:
      getVehicleSpeed in interface ClientVehicle
    • isClientControlled

      public boolean isClientControlled()
      Specified by:
      isClientControlled in interface ClientVehicle