Search in sources :

Example 1 with WareHouseConfiguration

use of com.wuest.prefab.Config.Structures.WareHouseConfiguration in project MC-Prefab by Brian-Wuest.

the class StructureWarehouse method CustomBlockProcessingHandled.

@Override
protected Boolean CustomBlockProcessingHandled(StructureConfiguration configuration, BuildBlock block, World world, BlockPos originalPos, EnumFacing assumedNorth, Block foundBlock, IBlockState blockState, EntityPlayer player) {
    if (foundBlock.getRegistryName().getResourceDomain().equals(Blocks.STAINED_GLASS.getRegistryName().getResourceDomain()) && foundBlock.getRegistryName().getResourcePath().equals(Blocks.STAINED_GLASS.getRegistryName().getResourcePath())) {
        WareHouseConfiguration wareHouseConfiguration = (WareHouseConfiguration) configuration;
        blockState = blockState.withProperty(BlockStainedGlass.COLOR, wareHouseConfiguration.dyeColor);
        block.setBlockState(blockState);
        this.priorityOneBlocks.add(block);
        return true;
    }
    return false;
}
Also used : WareHouseConfiguration(com.wuest.prefab.Config.Structures.WareHouseConfiguration)

Aggregations

WareHouseConfiguration (com.wuest.prefab.Config.Structures.WareHouseConfiguration)1