接口 IForgeLivingEntity
- 所有超级接口:
ICapabilityProvider
,ICapabilitySerializable<CompoundTag>
,IForgeEntity
,INBTSerializable<CompoundTag>
- 所有已知实现类:
AbstractChestedHorse
,AbstractClientPlayer
,AbstractFish
,AbstractGolem
,AbstractHorse
,AbstractIllager
,AbstractPiglin
,AbstractSchoolingFish
,AbstractSkeleton
,AbstractVillager
,AgeableMob
,AgeableWaterCreature
,Allay
,AmbientCreature
,Animal
,Armadillo
,ArmorStand
,Axolotl
,Bat
,Bee
,Blaze
,Bogged
,Breeze
,Camel
,Cat
,CaveSpider
,Chicken
,Cod
,Cow
,Creaking
,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
-
方法概要
修饰符和类型方法说明default boolean
canDrownInFluidType
(FluidType type) Returns whether the entity can drown in the fluid.default boolean
canSwimInFluidType
(FluidType type) Returns whether the entity can swim in the fluid.default void
jumpInFluid
(FluidType type) Performs what to do when an entity attempts to go up or "jump" in a fluid.default boolean
moveInFluid
(FluidState state, Vec3 movementVector, double gravity) Performs how an entity moves when within the fluid.default LivingEntity
self()
default void
sinkInFluid
(FluidType type) Performs what to do when an entity attempts to go down or "sink" in a fluid.从接口继承的方法 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
从接口继承的方法 net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, deserializeNBT, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getSoundFromFluidType, hasCustomOutlineRendering, isAddedToWorld, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToWorld, onRemovedFromWorld, revive, serializeNBT, shouldRiderSit, shouldUpdateFluidWhileBoating
-
方法详细资料
-
self
-
canSwimInFluidType
从接口复制的说明:IForgeEntity
Returns whether the entity can swim in the fluid.- 指定者:
canSwimInFluidType
在接口中IForgeEntity
- 参数:
type
- the type of the fluid- 返回:
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.- 参数:
type
- the type of the fluid
-
sinkInFluid
Performs what to do when an entity attempts to go down or "sink" in a fluid.- 参数:
type
- the type of the fluid
-
canDrownInFluidType
Returns whether the entity can drown in the fluid.- 参数:
type
- the type of the fluid- 返回:
true
if the entity can drown in the fluid,false
otherwise
-
moveInFluid
Performs how an entity moves when within the fluid. If using custom movement logic, the method should returntrue
. Otherwise, the movement logic will default to water.- 参数:
state
- the state of the fluidmovementVector
- the velocity of how the entity wants to movegravity
- the gravity to apply to the entity- 返回:
true
if custom movement logic is performed,false
otherwise
-