JavaScript is disabled on your browser.
All Superinterfaces:
IEntityExtension
All Known Implementing Classes:
net.minecraft.world.entity.AgeableMob
, net.minecraft.world.entity.animal.Animal
, EntityRendererEventsTest.MyEntity
, FakePlayer
, GameTestPlayer
, net.minecraft.world.entity.LivingEntity
, net.minecraft.world.entity.Mob
, PartEntityTest.TestEntity
, net.minecraft.world.entity.PathfinderMob
, net.minecraft.world.entity.animal.Pig
, net.minecraft.world.entity.player.Player
, net.minecraft.server.level.ServerPlayer
Method Summary
All Methods Instance Methods Default Methods
default boolean
Returns whether the entity can drown in the fluid.
default boolean
Returns whether the entity can swim in the fluid.
default void
Performs what to do when an entity attempts to go up or "jump" in a fluid.
default boolean
moveInFluid (net.minecraft.world.level.material.FluidState state,
net.minecraft.world.phys.Vec3 movementVector,
double gravity)
Performs how an entity moves when within the fluid.
default void
Executes in Entity.hurt(DamageSource, float)
after all damage and
effects have applied.
default net.minecraft.world.entity.LivingEntity
default void
Performs what to do when an entity attempts to go down or "sink" in a fluid.
Methods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType , canFluidExtinguish , canHydrateInFluidType , canRiderInteract , canStartSwimming , canTrample , captureDrops , captureDrops , copyAttachmentsFrom , getClassification , getEyeInFluidType , getFluidFallDistanceModifier , getFluidMotionScale , getFluidTypeHeight , getMaxHeightFluidType , getParts , getPersistentData , getSoundFromFluidType , hasCustomOutlineRendering , isAddedToLevel , isEyeInFluidType , isInFluidType , isInFluidType , isInFluidType , isInFluidType , isInFluidType , isMultipartEntity , isPushedByFluid , onAddedToLevel , onRemovedFromLevel , revive , sendPairingData , shouldRiderSit
Method Details
self
default net.minecraft.world.entity.LivingEntity self ()
canSwimInFluidType
default boolean canSwimInFluidType (FluidType type)
Returns whether the entity can swim in the fluid.
Specified by:
canSwimInFluidType
in interface IEntityExtension
Parameters:
type
- the type of the fluid
Returns:
true
if the entity can swim in the fluid, false
otherwise
jumpInFluid
Performs what to do when an entity attempts to go up or "jump" in a fluid.
Parameters:
type
- the type of the fluid
sinkInFluid
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 (net.minecraft.world.level.material.FluidState state,
net.minecraft.world.phys.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
onDamageTaken
Executes in Entity.hurt(DamageSource, float)
after all damage and
effects have applied. Overriding this method is preferred over overriding the
hurt method in custom entities where special behavior is desired after vanilla
logic.
Parameters:
damageContainer
- The aggregated damage details preceding this hook, which
includes changes made to the damage sequence by events.