Interface IForgeLivingEntity

All Superinterfaces:
ICapabilityProvider, ICapabilitySerializable<CompoundTag>, IForgeEntity, INBTSerializable<CompoundTag>
All Known Implementing Classes:
AbstractChestedHorse, AbstractClientPlayer, AbstractFish, AbstractGolem, AbstractHorse, AbstractIllager, AbstractPiglin, AbstractSchoolingFish, AbstractSkeleton, AbstractVillager, AgeableMob, Allay, AmbientCreature, Animal, ArmorStand, Axolotl, Bat, Bee, Blaze, Camel, Cat, CaveSpider, Chicken, Cod, Cow, Creeper, Dolphin, Donkey, Drowned, ElderGuardian, EnderDragon, EnderMan, Endermite, Evoker, FlyingMob, Fox, Frog, Ghast, Giant, GlowSquid, Goat, Guardian, Hoglin, Horse, Husk, Illusioner, IronGolem, LivingEntity, Llama, LocalPlayer, MagmaCube, Mob, Monster, Mule, MushroomCow, Ocelot, Panda, Parrot, PathfinderMob, PatrollingMonster, Phantom, Pig, Piglin, PiglinBrute, Pillager, Player, PolarBear, Pufferfish, Rabbit, Raider, Ravager, RemotePlayer, Salmon, ServerPlayer, Sheep, ShoulderRidingEntity, Shulker, Silverfish, Skeleton, SkeletonHorse, Slime, Sniffer, SnowGolem, SpellcasterIllager, Spider, Squid, Stray, Strider, Tadpole, TamableAnimal, TraderLlama, TropicalFish, Turtle, Vex, Villager, Vindicator, WanderingTrader, Warden, WaterAnimal, Witch, WitherBoss, WitherSkeleton, Wolf, Zoglin, Zombie, ZombieHorse, ZombieVillager, ZombifiedPiglin

public interface IForgeLivingEntity extends IForgeEntity
  • Method Details

    • self

      default LivingEntity self()
    • canSwimInFluidType

      default boolean canSwimInFluidType(FluidType type)
      Description copied from interface: IForgeEntity
      Returns whether the entity can swim in the fluid.
      Specified by:
      canSwimInFluidType in interface IForgeEntity
      Parameters:
      type - the type of the fluid
      Returns:
      true if the entity can swim in the fluid, false otherwise
    • jumpInFluid

      default void jumpInFluid(FluidType type)
      Performs what to do when an entity attempts to go up or "jump" in a fluid.
      Parameters:
      type - the type of the fluid
    • sinkInFluid

      default void sinkInFluid(FluidType type)
      Performs what to do when an entity attempts to go down or "sink" in a fluid.
      Parameters:
      type - the type of the fluid
    • canDrownInFluidType

      default boolean canDrownInFluidType(FluidType type)
      Returns whether the entity can drown in the fluid.
      Parameters:
      type - the type of the fluid
      Returns:
      true if the entity can drown in the fluid, false otherwise
    • moveInFluid

      default boolean moveInFluid(FluidState state, Vec3 movementVector, double gravity)
      Performs how an entity moves when within the fluid. If using custom movement logic, the method should return true. Otherwise, the movement logic will default to water.
      Parameters:
      state - the state of the fluid
      movementVector - the velocity of how the entity wants to move
      gravity - the gravity to apply to the entity
      Returns:
      true if custom movement logic is performed, false otherwise