Package net.commoble.databuddy.datagen

# Record Class BlockStateFile.Model

java.lang.Object
java.lang.Record
net.commoble.databuddy.datagen.BlockStateFile.Model

Record Components:
  `model` - Model id, e.g. minecraft:block/dirt
  `x` - Model x-rotation. Must be 0, 90, 180, or 270.
  `y` - Model y-rotation. Must be 0, 90, 180, or 270.
  `uvLock` - Whether to lock UVs when rotating model.
  `weight` - Weight of model part when used in a list of model parts. Must be positive.

Enclosing class:
  BlockStateFile

public static record BlockStateFile.Model(net.minecraft.resources.ResourceLocation model, int x, int y, boolean uvLock, int weight) extends Record
Component representing a rotated model object in variant and multipart definitions.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final com.mojang.serialization.Codec<BlockStateFile.Model>`
`CODEC`
codec

## Constructor Summary

Constructors
Constructor
Description
`Model(net.minecraft.resources.ResourceLocation model, int x, int y, boolean uvLock, int weight)`
Component representing a rotated model object in variant and multipart definitions.

## Method Summary

Modifier and Type
Method
Description
`static BlockStateFile.Model`
`create(net.minecraft.resources.ResourceLocation model)`
Returns new Model with no rotation, no uvlock, and weight 1.
`static BlockStateFile.Model`
`create(net.minecraft.resources.ResourceLocation model, net.minecraft.client.resources.model.BlockModelRotation rotation)`
Returns new Model with no uvlock and weight 1.
`static BlockStateFile.Model`
`create(net.minecraft.resources.ResourceLocation model, net.minecraft.client.resources.model.BlockModelRotation rotation, boolean uvLock)`
Returns Model with weight 1.
`static BlockStateFile.Model`
`create(net.minecraft.resources.ResourceLocation model, net.minecraft.client.resources.model.BlockModelRotation rotation, boolean uvLock, int weight)`
Returns new Model.
`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.resources.ResourceLocation`
`model()`
Returns the value of the `model` record component.
`final String`
`toString()`
Returns a string representation of this record class.
`boolean`
`uvLock()`
Returns the value of the `uvLock` record component.
`int`
`weight()`
Returns the value of the `weight` record component.
`int`
`x()`
Returns the value of the `x` record component.
`int`
`y()`
Returns the value of the `y` 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.Model> CODEC
codec

## Constructor Details

### Model

public Model(net.minecraft.resources.ResourceLocation model, int x, int y, boolean uvLock, int weight)
Component representing a rotated model object in variant and multipart definitions.

Parameters:
  `model` - Model id, e.g. minecraft:block/dirt
  `x` - Model x-rotation. Must be 0, 90, 180, or 270.
  `y` - Model y-rotation. Must be 0, 90, 180, or 270.
  `uvLock` - Whether to lock UVs when rotating model.
  `weight` - Weight of model part when used in a list of model parts. Must be positive.

## Method Details

### create

public static BlockStateFile.Model create(net.minecraft.resources.ResourceLocation model)
Returns new Model with no rotation, no uvlock, and weight 1.

Parameters:
  `model` - ResourceLocation of a model, e.g. "minecraft:block/dirt"
Returns:
  new Model with no rotation, no uvlock, and weight 1

### create

public static BlockStateFile.Model create(net.minecraft.resources.ResourceLocation model, net.minecraft.client.resources.model.BlockModelRotation rotation)
Returns new Model with no uvlock and weight 1.

Parameters:
  `model` - ResourceLocation of a model, e.g. "minecraft:block/dirt"
  `rotation` - x-y rotation to apply to the model
Returns:
  new Model with no uvlock and weight 1

### create

public static BlockStateFile.Model create(net.minecraft.resources.ResourceLocation model, net.minecraft.client.resources.model.BlockModelRotation rotation, boolean uvLock)
Returns Model with weight 1.

Parameters:
  `model` - ResourceLocation of a model, e.g. "minecraft:block/dirt"
  `rotation` - x-y rotation to apply to the model
  `uvLock` - whether to lock UVs
Returns:
  Model with weight 1

### create

public static BlockStateFile.Model create(net.minecraft.resources.ResourceLocation model, net.minecraft.client.resources.model.BlockModelRotation rotation, boolean uvLock, int weight)
Returns new Model.

Parameters:
  `model` - ResourceLocation of a model, e.g. "minecraft:block/dirt"
  `rotation` - x-y rotation to apply to the model
  `uvLock` - whether to lock UVs
  `weight` - weighting of positional-random Models, only used when multiple models are used in a variant/case
Returns:
  new Model

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

### model

public net.minecraft.resources.ResourceLocation model()
Returns the value of the `model` record component.

Returns:
  the value of the `model` record component

### x

public int x()
Returns the value of the `x` record component.

Returns:
  the value of the `x` record component

### y

public int y()
Returns the value of the `y` record component.

Returns:
  the value of the `y` record component

### uvLock

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

Returns:
  the value of the `uvLock` record component

### weight

public int weight()
Returns the value of the `weight` record component.

Returns:
  the value of the `weight` record component