Record Class AreaPacket
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.editor.AreaPacket
- All Implemented Interfaces:
AbstractPacket<AreaPacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record AreaPacket(AreaPacket.Action action, net.minecraft.resources.Identifier id, net.minecraft.world.phys.AABB bounds, net.minecraft.resources.Identifier dimensionId, Color color, List<net.minecraft.resources.Identifier> modules, net.minecraft.nbt.CompoundTag moduleData, net.minecraft.nbt.CompoundTag linkedAreas, AreaPacket.AreaType areaType)
extends Record
implements AbstractPacket<AreaPacket>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface AbstractPacket
AbstractPacket.Definition<T>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, AreaPacket> static final AbstractPacket.Definition<AreaPacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<AreaPacket> -
Constructor Summary
ConstructorsConstructorDescriptionAreaPacket(AreaPacket.Action action, net.minecraft.resources.Identifier id, net.minecraft.world.phys.AABB bounds, net.minecraft.resources.Identifier dimensionId, Color color, List<net.minecraft.resources.Identifier> modules, net.minecraft.nbt.CompoundTag moduleData, net.minecraft.nbt.CompoundTag linkedAreas, AreaPacket.AreaType areaType) Creates an instance of aAreaPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.areaType()Returns the value of theareaTyperecord component.net.minecraft.world.phys.AABBbounds()Returns the value of theboundsrecord component.color()Returns the value of thecolorrecord component.static AreaPacketnet.minecraft.resources.IdentifierReturns the value of thedimensionIdrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AreaPacket> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<AreaPacket> getType()final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifierid()Returns the value of theidrecord component.net.minecraft.nbt.CompoundTagReturns the value of thelinkedAreasrecord component.net.minecraft.nbt.CompoundTagReturns the value of themoduleDatarecord component.List<net.minecraft.resources.Identifier> modules()Returns the value of themodulesrecord component.static AreaPacketremove(net.minecraft.resources.Identifier areaId) static AreaPacketfinal StringtoString()Returns a string representation of this record class.static AreaPacketMethods inherited from interface AbstractPacket
handleClient, handleServer, typeMethods 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<AreaPacket> TYPE -
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AreaPacket> CODEC -
DEFINITION
-
-
Constructor Details
-
AreaPacket
public AreaPacket(AreaPacket.Action action, net.minecraft.resources.Identifier id, net.minecraft.world.phys.AABB bounds, net.minecraft.resources.Identifier dimensionId, Color color, List<net.minecraft.resources.Identifier> modules, net.minecraft.nbt.CompoundTag moduleData, net.minecraft.nbt.CompoundTag linkedAreas, AreaPacket.AreaType areaType) Creates an instance of aAreaPacketrecord class.- Parameters:
action- the value for theactionrecord componentid- the value for theidrecord componentbounds- the value for theboundsrecord componentdimensionId- the value for thedimensionIdrecord componentcolor- the value for thecolorrecord componentmodules- the value for themodulesrecord componentmoduleData- the value for themoduleDatarecord componentlinkedAreas- the value for thelinkedAreasrecord componentareaType- the value for theareaTyperecord component
-
-
Method Details
-
create
-
update
-
remove
-
requestSync
-
getType
- Specified by:
getTypein interfaceAbstractPacket<AreaPacket>
-
getBoundTo
- Specified by:
getBoundToin interfaceAbstractPacket<AreaPacket>
-
getCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AreaPacket> getCodec()- Specified by:
getCodecin interfaceAbstractPacket<AreaPacket>
-
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). -
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
id
public net.minecraft.resources.Identifier id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
bounds
public net.minecraft.world.phys.AABB bounds()Returns the value of theboundsrecord component.- Returns:
- the value of the
boundsrecord component
-
dimensionId
public net.minecraft.resources.Identifier dimensionId()Returns the value of thedimensionIdrecord component.- Returns:
- the value of the
dimensionIdrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
modules
Returns the value of themodulesrecord component.- Returns:
- the value of the
modulesrecord component
-
moduleData
public net.minecraft.nbt.CompoundTag moduleData()Returns the value of themoduleDatarecord component.- Returns:
- the value of the
moduleDatarecord component
-
linkedAreas
public net.minecraft.nbt.CompoundTag linkedAreas()Returns the value of thelinkedAreasrecord component.- Returns:
- the value of the
linkedAreasrecord component
-
areaType
Returns the value of theareaTyperecord component.- Returns:
- the value of the
areaTyperecord component
-