Record Class ContextEntityReward.Info
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.data.reward.ContextEntityReward.Info
- All Implemented Interfaces:
INamedRewardInfo,IRewardInfo
- Enclosing class:
ContextEntityReward
public static record ContextEntityReward.Info(IRewardInfo wrapped, IEntityTarget target)
extends Record
implements INamedRewardInfo
-
Nested Class Summary
Nested classes/interfaces inherited from interface petrolpark.mc.library.core.data.reward.info.INamedRewardInfo
INamedRewardInfo.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ContextEntityReward.Info> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ContextEntityReward.Info> Fields inherited from interface petrolpark.mc.library.core.data.reward.info.IRewardInfo
DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionInfo(IRewardInfo wrapped, IEntityTarget target) Creates an instance of aInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal 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) target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.wrapped()Returns the value of thewrappedrecord component.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.INamedRewardInfo
translate, translateSimpleMethods 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,ContextEntityReward.Info> STREAM_CODEC
-
-
Constructor Details
-
Info
Creates an instance of aInforecord class.- Parameters:
wrapped- the value for thewrappedrecord componenttarget- the value for thetargetrecord component
-
-
Method Details
-
getRewardInfoType
- Specified by:
getRewardInfoTypein interfaceINamedRewardInfo- Specified by:
getRewardInfoTypein interfaceIRewardInfo
-
render
public void render(net.minecraft.client.gui.GuiGraphics graphics) - Specified by:
renderin interfaceIRewardInfo
-
addToDescription
- Specified by:
addToDescriptionin 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. All components in this record class are compared withObjects::equals(Object,Object). -
wrapped
Returns the value of thewrappedrecord component.- Returns:
- the value of the
wrappedrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-