Package commoble.databuddy.datagen

# Record Class BlockStateFile.PropertyValue<T extends Comparable<T>>

java.lang.Object
java.lang.Record
commoble.databuddy.datagen.BlockStateFile.PropertyValue<T>

Record Components:
  `property` - Property of a blockstate.
  `value` - value of a blockstate Property.

Enclosing class:
  BlockStateFile

public static record BlockStateFile.PropertyValue<T extends Comparable<T>>(net.minecraft.world.level.block.state.properties.Property<T extends Comparable<T>> property, T extends Comparable<T> value) extends Record
Component of Variants definitions, representing a property-value entry.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final com.mojang.serialization.Codec<BlockStateFile.PropertyValue<?>>`
`CODEC`
codec
`static final com.mojang.serialization.Codec<List<BlockStateFile.PropertyValue<?>>>`
`LIST_CODEC`
list codec

## Constructor Summary

Constructors
Constructor
Description
`PropertyValue(net.minecraft.world.level.block.state.properties.Property<T> property, T value)`
Creates an instance of a `PropertyValue` record class.

## Method Summary

Modifier and Type
Method
Description
`static <T extends Comparable<T>>
BlockStateFile.PropertyValue<T>`
`create(net.minecraft.world.level.block.state.properties.Property<T> property, T value)`
Creates a property value from a property and a value
`final boolean`
`equals(Object o)`
Indicates whether some other object is "equal to" this one.
`final int`
`hashCode()`
Returns a hash code value for this object.
`net.minecraft.world.level.block.state.properties.Property<T>`
`property()`
Returns the value of the `property` record component.
`String`
`toString()`
Returns a string representation of this record class.
`T`
`value()`
Returns the value of the `value` record component.

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

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

## Field Details

### CODEC

public static final com.mojang.serialization.Codec<BlockStateFile.PropertyValue<?>> CODEC
codec

### LIST_CODEC

public static final com.mojang.serialization.Codec<List<BlockStateFile.PropertyValue<?>>> LIST_CODEC
list codec

## Constructor Details

### PropertyValue

public PropertyValue(net.minecraft.world.level.block.state.properties.Property<T> property, T value)
Creates an instance of a `PropertyValue` record class.

Parameters:
  `property` - the value for the `property` record component
  `value` - the value for the `value` record component

## Method Details

### create

public static <T extends Comparable<T>> BlockStateFile.PropertyValue<T> create(net.minecraft.world.level.block.state.properties.Property<T> property, T value)
Creates a property value from a property and a value

Type Parameters:
  `T` - value type
Parameters:
  `property` - Property of a blockstate
  `value` - Value of a blockstate property
Returns:
  PropertyValue with that property and value

### toString

public 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. All components in this record class are compared with `Objects::equals(Object,Object)`.

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.

### property

public net.minecraft.world.level.block.state.properties.Property<T> property()
Returns the value of the `property` record component.

Returns:
  the value of the `property` record component

### value

public T value()
Returns the value of the `value` record component.

Returns:
  the value of the `value` record component