Package commoble.bagofyurting.api

# Interface BlockDataDeserializer<T>

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BlockDataDeserializer<T>

## Method Summary

Modifier and Type
Method
Description
`void`
`readWithYurtContext​(T blockEntity, net.minecraft.nbt.CompoundTag input, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Rotation rotation, net.minecraft.core.BlockPos minYurt, net.minecraft.core.BlockPos maxYurt, net.minecraft.core.BlockPos origin)`
Function that reads a standard-format blockentity compound into the given blockentity, applying transformations from yurt context if necessary.

## Method Details

### readWithYurtContext

void readWithYurtContext​(T blockEntity, net.minecraft.nbt.CompoundTag input, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Rotation rotation, net.minecraft.core.BlockPos minYurt, net.minecraft.core.BlockPos maxYurt, net.minecraft.core.BlockPos origin)
Function that reads a standard-format blockentity compound into the given blockentity, applying transformations from yurt context if necessary. This function is called for each blockentity that becomes unyurted into the Level, after all blocks and blockentities have been placed into the Level. Be aware that minYurt and maxYurt are based on the yurting radius of the bag item, and the area defined by them may be larger than the area actually changed during the unyurting.

Parameters:
  `blockEntity` - The new blockentity that data is being read into.
  `input` - The compound from yurt data that we are reading into the blockentity.
  `level` - The Level that the blockentity was placed in.
  `pos` - The position that the blockentity was placed at. If the blockentity has any absolute-position-sensitive data that must be translated when yurted, it is recommended to subtract the old position when serializing and to add the new position when deserializing. (The position of the blockentity itself is handled automatically and does not need to be manually transformed by the implementor).
  `state` - The new blockstate in the Level at the te's position
  `rotation` - A rotation to apply to any rotation-sensitive data in the blockentity.
  `minYurt` - The minimal corner of the yurt region being placed into the Level.
  `maxYurt` - The maximal corner of the yurt region being placed into the Level
  `origin` - The position that the bag of yurting was used at to unload blocks (the bottom-center of the yurting region)