Package net.commoble.infiniverse.internal

# Record Class UpdateDimensionsPacket

java.lang.Object
java.lang.Record
net.commoble.infiniverse.internal.UpdateDimensionsPacket

Record Components:
  `keys` - Keys to add or remove in the client's dimension list
  `add` - If true, keys are to be added; if false, keys are to be removed

All Implemented Interfaces:
  `net.minecraft.network.protocol.common.custom.CustomPacketPayload`

public record UpdateDimensionsPacket(Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>> keys, boolean add) extends Record implements net.minecraft.network.protocol.common.custom.CustomPacketPayload

## Field Summary

Fields
Modifier and Type
Field
Description
`static final net.minecraft.resources.ResourceLocation`
`ID`

## Constructor Summary

Constructors
Constructor
Description
`UpdateDimensionsPacket(Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>> keys, boolean add)`
Creates an instance of a `UpdateDimensionsPacket` record class.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`add()`
Returns the value of the `add` record component.
`final boolean`
`equals(Object o)`
Indicates whether some other object is "equal to" this one.
`void`
`handle(net.neoforged.neoforge.network.handling.PlayPayloadContext context)`
`final int`
`hashCode()`
Returns a hash code value for this object.
`net.minecraft.resources.ResourceLocation`
`id()`
`Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>>`
`keys()`
Returns the value of the `keys` record component.
`static UpdateDimensionsPacket`
`read(net.minecraft.network.FriendlyByteBuf buffer)`
`final String`
`toString()`
Returns a string representation of this record class.
`void`
`write(net.minecraft.network.FriendlyByteBuf buffer)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### ID

public static final net.minecraft.resources.ResourceLocation ID

## Constructor Details

### UpdateDimensionsPacket

public UpdateDimensionsPacket(Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>> keys, boolean add)
Creates an instance of a `UpdateDimensionsPacket` record class.

Parameters:
  `keys` - the value for the `keys` record component
  `add` - the value for the `add` record component

## Method Details

### read

public static UpdateDimensionsPacket read(net.minecraft.network.FriendlyByteBuf buffer)

### id

public net.minecraft.resources.ResourceLocation id()

Specified by:
  `id` in interface `net.minecraft.network.protocol.common.custom.CustomPacketPayload`

### write

public void write(net.minecraft.network.FriendlyByteBuf buffer)

Specified by:
  `write` in interface `net.minecraft.network.protocol.common.custom.CustomPacketPayload`

### handle

public void handle(net.neoforged.neoforge.network.handling.PlayPayloadContext context)

### toString

public final String 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.

Specified by:
  `toString` in class `Record`
Returns:
  a string representation of this object

### 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.

Specified by:
  `hashCode` in class `Record`
Returns:
  a hash code value for this object

### equals

public final boolean equals(Object o)
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 with `Objects::equals(Object,Object)`; primitive components are compared with '=='.

Specified by:
  `equals` in class `Record`
Parameters:
  `o` - the object with which to compare
Returns:
  `true` if this object is the same as the `o` argument; `false` otherwise.

### keys

public Set<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>> keys()
Returns the value of the `keys` record component.

Returns:
  the value of the `keys` record component

### add

public boolean add()
Returns the value of the `add` record component.

Returns:
  the value of the `add` record component