Record Class StructurePacket
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.network.StructurePacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record StructurePacket(Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> pieceStructures, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> pieceStructureTags, Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> boxStructures, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> boxStructureTags)
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>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, StructurePacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<StructurePacket> -
Constructor Summary
ConstructorsConstructorDescriptionStructurePacket(Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> pieceStructures, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> pieceStructureTags, Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> boxStructures, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> boxStructureTags) Creates an instance of aStructurePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionSet<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> Returns the value of theboxStructuresrecord component.Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> Returns the value of theboxStructureTagsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> Returns the value of thepieceStructuresrecord component.Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> Returns the value of thepieceStructureTagsrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()Methods 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<StructurePacket> TYPE -
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, StructurePacket> CODEC
-
-
Constructor Details
-
StructurePacket
public StructurePacket(Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> pieceStructures, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> pieceStructureTags, Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> boxStructures, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> boxStructureTags) Creates an instance of aStructurePacketrecord class.- Parameters:
pieceStructures- the value for thepieceStructuresrecord componentpieceStructureTags- the value for thepieceStructureTagsrecord componentboxStructures- the value for theboxStructuresrecord componentboxStructureTags- the value for theboxStructureTagsrecord component
-
-
Method Details
-
type
public 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
-
hashCode
-
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). -
pieceStructures
public Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> pieceStructures()Returns the value of thepieceStructuresrecord component.- Returns:
- the value of the
pieceStructuresrecord component
-
pieceStructureTags
public Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> pieceStructureTags()Returns the value of thepieceStructureTagsrecord component.- Returns:
- the value of the
pieceStructureTagsrecord component
-
boxStructures
public Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> boxStructures()Returns the value of theboxStructuresrecord component.- Returns:
- the value of the
boxStructuresrecord component
-
boxStructureTags
public Set<net.minecraft.tags.TagKey<net.minecraft.world.level.levelgen.structure.Structure>> boxStructureTags()Returns the value of theboxStructureTagsrecord component.- Returns:
- the value of the
boxStructureTagsrecord component
-