类 MobEffect
java.lang.Object
net.minecraft.world.effect.MobEffect
- 所有已实现的接口:
FeatureElement
,IForgeMobEffect
- 直接已知子类:
AbsorptionMobEffect
,BadOmenMobEffect
,HungerMobEffect
,InfestedMobEffect
,InstantenousMobEffect
,OozingMobEffect
,PoisonMobEffect
,RaidOmenMobEffect
,RegenerationMobEffect
,WeavingMobEffect
,WindChargedMobEffect
,WitherMobEffect
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private static final int
private final Map
<Holder<Attribute>, MobEffect.AttributeTemplate> private int
private final MobEffectCategory
private final int
private String
private Object
private final Function
<MobEffectInstance, ParticleOptions> private FeatureFlagSet
private Optional
<SoundEvent> static final StreamCodec
<RegistryFriendlyByteBuf, Holder<MobEffect>> 从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器限定符构造器说明protected
MobEffect
(MobEffectCategory p_19451_, int p_19452_) protected
MobEffect
(MobEffectCategory p_335432_, int p_334901_, ParticleOptions p_331136_) -
方法概要
修饰符和类型方法说明addAttributeModifier
(Holder<Attribute> p_332101_, ResourceLocation p_342976_, double p_19475_, AttributeModifier.Operation p_19476_) void
addAttributeModifiers
(AttributeMap p_19479_, int p_19480_) boolean
applyEffectTick
(ServerLevel p_361900_, LivingEntity p_333541_, int p_333570_) void
applyInstantenousEffect
(ServerLevel p_369379_, Entity p_19462_, Entity p_19463_, LivingEntity p_19464_, int p_19465_, double p_19466_) void
createModifiers
(int p_334564_, BiConsumer<Holder<Attribute>, AttributeModifier> p_333602_) createParticleOptions
(MobEffectInstance p_332465_) int
int
getColor()
protected String
private void
void
initializeClient
(Consumer<IClientMobEffectExtensions> consumer) boolean
boolean
void
onEffectAdded
(LivingEntity p_335100_, int p_336309_) void
onEffectStarted
(LivingEntity p_299085_, int p_297449_) void
onMobHurt
(ServerLevel p_367917_, LivingEntity p_19467_, int p_19468_, DamageSource p_334111_, float p_330556_) void
onMobRemoved
(ServerLevel p_368376_, LivingEntity p_335815_, int p_328980_, Entity.RemovalReason p_328413_) void
removeAttributeModifiers
(AttributeMap p_19470_) requiredFeatures
(FeatureFlag... p_329270_) setBlendDuration
(int p_328727_) boolean
shouldApplyEffectTickThisTick
(int p_297908_, int p_301085_) withSoundOnAdded
(SoundEvent p_329951_) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
从接口继承的方法 net.minecraftforge.common.extensions.IForgeMobEffect
getCurativeItems, getSortOrder
-
字段详细资料
-
CODEC
-
STREAM_CODEC
-
AMBIENT_ALPHA
private static final int AMBIENT_ALPHA -
attributeModifiers
-
category
-
color
private final int color -
particleFactory
-
descriptionId
-
blendDurationTicks
private int blendDurationTicks -
soundOnAdded
-
requiredFeatures
-
effectRenderer
-
-
构造器详细资料
-
MobEffect
-
MobEffect
-
-
方法详细资料
-
getBlendDurationTicks
public int getBlendDurationTicks() -
applyEffectTick
-
applyInstantenousEffect
public void applyInstantenousEffect(ServerLevel p_369379_, @Nullable Entity p_19462_, @Nullable Entity p_19463_, LivingEntity p_19464_, int p_19465_, double p_19466_) -
shouldApplyEffectTickThisTick
public boolean shouldApplyEffectTickThisTick(int p_297908_, int p_301085_) -
onEffectStarted
-
onEffectAdded
-
onMobRemoved
public void onMobRemoved(ServerLevel p_368376_, LivingEntity p_335815_, int p_328980_, Entity.RemovalReason p_328413_) -
onMobHurt
public void onMobHurt(ServerLevel p_367917_, LivingEntity p_19467_, int p_19468_, DamageSource p_334111_, float p_330556_) -
isInstantenous
public boolean isInstantenous() -
getOrCreateDescriptionId
-
getDescriptionId
-
getDisplayName
-
getCategory
-
getColor
public int getColor() -
addAttributeModifier
public MobEffect addAttributeModifier(Holder<Attribute> p_332101_, ResourceLocation p_342976_, double p_19475_, AttributeModifier.Operation p_19476_) -
setBlendDuration
-
createModifiers
public void createModifiers(int p_334564_, BiConsumer<Holder<Attribute>, AttributeModifier> p_333602_) -
removeAttributeModifiers
-
addAttributeModifiers
-
isBeneficial
public boolean isBeneficial() -
createParticleOptions
-
withSoundOnAdded
-
requiredFeatures
-
requiredFeatures
- 指定者:
requiredFeatures
在接口中FeatureElement
-
getEffectRendererInternal
-
initClient
private void initClient() -
initializeClient
-