Interface Frictional

All Known Subinterfaces:
AbstractHorse, AbstractSkeleton, AbstractVillager, Ageable, Allay, Ambient, Animals, Armadillo, ArmorStand, Axolotl, Bat, Bee, Blaze, Bogged, Breedable, Breeze, Camel, Cat, CaveSpider, ChestedHorse, Chicken, Cod, CollarColorable, CommandMinecart, ComplexLivingEntity, Cow, Creaking, Creature, Creeper, Dolphin, Donkey, Drowned, ElderGuardian, EnderDragon, Enderman, Endermite, Enemy, Evoker, ExplosiveMinecart, Fish, Flying, Fox, Frog, Ghast, Giant, GlowSquid, Goat, Golem, Guardian, Hoglin, HopperMinecart, Horse, HumanEntity, Husk, Illager, Illusioner, IronGolem, Item, LivingEntity, Llama, MagmaCube, Minecart, Mob, Monster, Mule, MushroomCow, NPC, Ocelot, Panda, Parrot, Phantom, Pig, Piglin, PiglinAbstract, PiglinBrute, PigZombie, Pillager, Player, PolarBear, PoweredMinecart, PufferFish, Rabbit, Raider, RangedEntity, Ravager, RideableMinecart, Salmon, SchoolableFish, Sheep, Shulker, Silverfish, Skeleton, SkeletonHorse, Slime, Sniffer, Snowman, SpawnerMinecart, Spellcaster, Spider, Squid, Steerable, StorageMinecart, Stray, Strider, Tadpole, Tameable, TraderLlama, TropicalFish, Turtle, Vex, Villager, Vindicator, WanderingTrader, Warden, WaterMob, Witch, Wither, WitherSkeleton, Wolf, Zoglin, Zombie, ZombieHorse, ZombieVillager

@NullMarked public interface Frictional
Represents an Entity that can experience friction with the air and ground.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the friction state of this entity.
    void
    Sets the friction state of this entity.
  • Method Details

    • getFrictionState

      TriState getFrictionState()
      Gets the friction state of this entity. When set to TriState.TRUE, the entity will always experience friction. When set to TriState.FALSE, the entity will never experience friction. When set to TriState.NOT_SET, the entity will fall back to Minecraft's default behaviour.
      Returns:
      the entity's friction state
    • setFrictionState

      void setFrictionState(TriState state)
      Sets the friction state of this entity. When set to TriState.TRUE, the entity will always experience friction. When set to TriState.FALSE, the entity will never experience friction. When set to TriState.NOT_SET, the entity will fall back to Minecraft's default behaviour.

      Please note that changing this value will do nothing for a player.

      Parameters:
      state - the new friction state to set for the entity