Record Class SyncMerchantTradesPayload
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.network.payload.SyncMerchantTradesPayload
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record SyncMerchantTradesPayload(net.minecraft.world.entity.EntityType<?> entityType, MerchantTrades trades)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSyncMerchantTradesPayload(net.minecraft.network.FriendlyByteBuf pBuffer) SyncMerchantTradesPayload(net.minecraft.world.entity.EntityType<?> entityType, MerchantTrades trades) Creates an instance of aSyncMerchantTradesPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.entity.EntityType<?>Returns the value of theentityTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()final StringtoString()Returns a string representation of this record class.trades()Returns the value of thetradesrecord component.voidwrite(net.minecraft.network.FriendlyByteBuf pBuffer)
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
SyncMerchantTradesPayload
public SyncMerchantTradesPayload(net.minecraft.network.FriendlyByteBuf pBuffer) -
SyncMerchantTradesPayload
public SyncMerchantTradesPayload(net.minecraft.world.entity.EntityType<?> entityType, MerchantTrades trades) Creates an instance of aSyncMerchantTradesPayloadrecord class.- Parameters:
entityType- the value for theentityTyperecord componenttrades- the value for thetradesrecord component
-
-
Method Details
-
write
public void write(net.minecraft.network.FriendlyByteBuf pBuffer) - Specified by:
writein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
id
public net.minecraft.resources.ResourceLocation id()- Specified by:
idin 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. All components in this record class are compared withObjects::equals(Object,Object). -
entityType
public net.minecraft.world.entity.EntityType<?> entityType()Returns the value of theentityTyperecord component.- Returns:
- the value of the
entityTyperecord component
-
trades
Returns the value of thetradesrecord component.- Returns:
- the value of the
tradesrecord component
-