Search in sources :

Example 1 with WeightedBlockState

use of ivorius.reccomplex.world.gen.feature.structure.generic.WeightedBlockState in project RecurrentComplex by Ivorforce.

the class TransformerReplace method transformBlock.

@Override
public void transformBlock(NBTNone instanceData, Phase phase, StructureSpawnContext context, int[] areaSize, BlockPos coord, IBlockState sourceState) {
    WeightedBlockState blockState;
    if (destination.getContents().size() > 0)
        blockState = WeightedSelector.selectItem(context.random, destination.getContents());
    else
        blockState = new WeightedBlockState(null, null, null);
    setBlock(context, areaSize, coord, blockState, () -> blockState.tileEntityInfo);
}
Also used : WeightedBlockState(ivorius.reccomplex.world.gen.feature.structure.generic.WeightedBlockState)

Aggregations

WeightedBlockState (ivorius.reccomplex.world.gen.feature.structure.generic.WeightedBlockState)1