Record Class VillagerGossipEntityReward.Info
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.data.reward.entity.VillagerGossipEntityReward.Info
- All Implemented Interfaces:
INamedRewardInfo,IRewardInfo
- Enclosing class:
VillagerGossipEntityReward
public static record VillagerGossipEntityReward.Info(net.minecraft.world.entity.ai.gossip.GossipType type, NumberEstimate amount, 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<VillagerGossipEntityReward.Info> static final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, VillagerGossipEntityReward.Info> static final net.minecraft.resources.ResourceLocationFields inherited from interface petrolpark.mc.library.core.data.reward.info.IRewardInfo
DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionInfo(net.minecraft.world.entity.ai.gossip.GossipType type, NumberEstimate amount, IEntityTarget target) Creates an instance of aInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidamount()Returns the value of theamountrecord 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) target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.entity.ai.gossip.GossipTypetype()Returns the value of thetyperecord 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, translateSimple
-
Field Details
-
MAJOR_NEGATIVE_TEXTURE
public static final net.minecraft.resources.ResourceLocation MAJOR_NEGATIVE_TEXTURE -
MINOR_NEGATIVE_TEXTURE
public static final net.minecraft.resources.ResourceLocation MINOR_NEGATIVE_TEXTURE -
MINOR_POSITIVE_TEXTURE
public static final net.minecraft.resources.ResourceLocation MINOR_POSITIVE_TEXTURE -
MAJOR_POSITIVE_TEXTURE
public static final net.minecraft.resources.ResourceLocation MAJOR_POSITIVE_TEXTURE -
TRADING_TEXTURE
public static final net.minecraft.resources.ResourceLocation TRADING_TEXTURE -
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,VillagerGossipEntityReward.Info> STREAM_CODEC
-
-
Constructor Details
-
Info
public Info(net.minecraft.world.entity.ai.gossip.GossipType type, NumberEstimate amount, IEntityTarget target) Creates an instance of aInforecord class.- Parameters:
type- the value for thetyperecord componentamount- the value for theamountrecord componenttarget- the value for thetargetrecord 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 interfaceINamedRewardInfo- 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. All components in this record class are compared withObjects::equals(Object,Object). -
type
public net.minecraft.world.entity.ai.gossip.GossipType type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-