Record Class MobEffectEntityReward.Info
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.data.reward.entity.MobEffectEntityReward.Info
- All Implemented Interfaces:
IRewardInfo
- Enclosing class:
MobEffectEntityReward
public static record MobEffectEntityReward.Info(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, NumberEstimate duration, NumberEstimate amplifier, boolean showParticles)
extends Record
implements IRewardInfo
-
Nested Class Summary
Nested classes/interfaces inherited from interface petrolpark.mc.library.core.data.reward.info.IRewardInfo
IRewardInfo.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<MobEffectEntityReward.Info> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, MobEffectEntityReward.Info> Fields inherited from interface petrolpark.mc.library.core.data.reward.info.IRewardInfo
DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionInfo(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, NumberEstimate duration, NumberEstimate amplifier, boolean showParticles) Creates an instance of aInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the value of theamplifierrecord component.duration()Returns the value of thedurationrecord component.net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect()Returns the value of theeffectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidrender(net.minecraft.client.gui.GuiGraphics graphics) booleanReturns the value of theshowParticlesrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface petrolpark.mc.library.core.data.reward.info.IRewardInfo
getItemStack
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,MobEffectEntityReward.Info> STREAM_CODEC
-
-
Constructor Details
-
Info
public Info(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, NumberEstimate duration, NumberEstimate amplifier, boolean showParticles) Creates an instance of aInforecord class.- Parameters:
effect- the value for theeffectrecord componentduration- the value for thedurationrecord componentamplifier- the value for theamplifierrecord componentshowParticles- the value for theshowParticlesrecord component
-
-
Method Details
-
render
public void render(net.minecraft.client.gui.GuiGraphics graphics) - Specified by:
renderin interfaceIRewardInfo
-
addToDescription
- Specified by:
addToDescriptionin interfaceIRewardInfo
-
getRewardInfoType
- Specified by:
getRewardInfoTypein interfaceIRewardInfo
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
effect
public net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect()Returns the value of theeffectrecord component.- Returns:
- the value of the
effectrecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
amplifier
Returns the value of theamplifierrecord component.- Returns:
- the value of the
amplifierrecord component
-
showParticles
public boolean showParticles()Returns the value of theshowParticlesrecord component.- Returns:
- the value of the
showParticlesrecord component
-