Package commoble.bagofyurting

# Class CompressedBagOfYurtingData

java.lang.Object
commoble.bagofyurting.CompressedBagOfYurtingData

public class CompressedBagOfYurtingData extends Object

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`CompressedBagOfYurtingData.CompressedStateData`

## Field Summary

Fields
Modifier and Type
Field
Description
`static com.mojang.serialization.Codec<CompressedBagOfYurtingData>`
`CODEC`
`static org.apache.logging.log4j.Logger`
`LOGGER`

## Constructor Summary

Constructors
Constructor
Description
`CompressedBagOfYurtingData​(List<net.minecraft.world.level.block.state.BlockState> states, List<CompressedBagOfYurtingData.CompressedStateData> data)`

## Method Summary

Modifier and Type
Method
Description
`static CompressedBagOfYurtingData`
`fromNBT​(net.minecraft.nbt.CompoundTag nbt)`
Reads data from nbt, logs an error if it fails to do so
`List<CompressedBagOfYurtingData.CompressedStateData>`
`getData()`
`List<net.minecraft.world.level.block.state.BlockState>`
`getStates()`
`net.minecraft.nbt.CompoundTag`
`toNBT()`
`BagOfYurtingData`
`uncompress()`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### LOGGER

public static final org.apache.logging.log4j.Logger LOGGER

### CODEC

public static final com.mojang.serialization.Codec<CompressedBagOfYurtingData> CODEC

## Constructor Details

### CompressedBagOfYurtingData

public CompressedBagOfYurtingData​(List<net.minecraft.world.level.block.state.BlockState> states, List<CompressedBagOfYurtingData.CompressedStateData> data)

Parameters:
  `states` - A list of blockstates
  `data` - A list of CompressedStateDatas, where the stateindex of each data object refers to an index in the states list

## Method Details

### getStates

public List<net.minecraft.world.level.block.state.BlockState> getStates()

### getData

public List<CompressedBagOfYurtingData.CompressedStateData> getData()

### uncompress

public BagOfYurtingData uncompress()

### toNBT

public net.minecraft.nbt.CompoundTag toNBT()

### fromNBT

public static CompressedBagOfYurtingData fromNBT​(net.minecraft.nbt.CompoundTag nbt)
Reads data from nbt, logs an error if it fails to do so

Parameters:
  `nbt` - The nbt to read from
Returns:
  A present data object if successful, or an empty data if it failed