Package fr.pacdu.pacpackquests.network
Record Class SaveQuestPayload
java.lang.Object
java.lang.Record
fr.pacdu.pacpackquests.network.SaveQuestPayload
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record SaveQuestPayload(String questId, String title, String category, String iconId, int displayX, int displayY, List<String> parents, Map<String,String> properties, List<QuestTask> tasks, List<QuestReward> rewards)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, SaveQuestPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<SaveQuestPayload> -
Constructor Summary
ConstructorsConstructorDescriptionSaveQuestPayload(QuestDefinition quest, net.minecraft.core.HolderLookup.Provider registries) SaveQuestPayload(String questId, String title, String category, String iconId, int displayX, int displayY, List<String> parents, Map<String, String> properties, List<QuestTask> tasks, List<QuestReward> rewards) Creates an instance of aSaveQuestPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.intdisplayX()Returns the value of thedisplayXrecord component.intdisplayY()Returns the value of thedisplayYrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iconId()Returns the value of theiconIdrecord component.parents()Returns the value of theparentsrecord component.Returns the value of thepropertiesrecord component.questId()Returns the value of thequestIdrecord component.rewards()Returns the value of therewardsrecord component.tasks()Returns the value of thetasksrecord component.title()Returns the value of thetitlerecord component.toDefinition(net.minecraft.core.HolderLookup.Provider registries) final StringtoString()Returns a string representation of this record class.@NotNull net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<SaveQuestPayload> TYPE -
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,SaveQuestPayload> CODEC
-
-
Constructor Details
-
SaveQuestPayload
-
SaveQuestPayload
public SaveQuestPayload(String questId, String title, String category, String iconId, int displayX, int displayY, List<String> parents, Map<String, String> properties, List<QuestTask> tasks, List<QuestReward> rewards) Creates an instance of aSaveQuestPayloadrecord class.- Parameters:
questId- the value for thequestIdrecord componenttitle- the value for thetitlerecord componentcategory- the value for thecategoryrecord componenticonId- the value for theiconIdrecord componentdisplayX- the value for thedisplayXrecord componentdisplayY- the value for thedisplayYrecord componentparents- the value for theparentsrecord componentproperties- the value for thepropertiesrecord componenttasks- the value for thetasksrecord componentrewards- the value for therewardsrecord component
-
-
Method Details
-
toDefinition
-
type
@NotNull public @NotNull net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
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 '=='. -
questId
Returns the value of thequestIdrecord component.- Returns:
- the value of the
questIdrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
iconId
Returns the value of theiconIdrecord component.- Returns:
- the value of the
iconIdrecord component
-
displayX
public int displayX()Returns the value of thedisplayXrecord component.- Returns:
- the value of the
displayXrecord component
-
displayY
public int displayY()Returns the value of thedisplayYrecord component.- Returns:
- the value of the
displayYrecord component
-
parents
Returns the value of theparentsrecord component.- Returns:
- the value of the
parentsrecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
tasks
Returns the value of thetasksrecord component.- Returns:
- the value of the
tasksrecord component
-
rewards
Returns the value of therewardsrecord component.- Returns:
- the value of the
rewardsrecord component
-