Search in sources :

Example 1 with ProduceFarmConfiguration

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

the class StructureProduceFarm 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())) {
        ProduceFarmConfiguration wareHouseConfiguration = (ProduceFarmConfiguration) configuration;
        blockState = blockState.withProperty(BlockStainedGlass.COLOR, wareHouseConfiguration.dyeColor);
        block.setBlockState(blockState);
        // this.placedBlocks.add(block);
        this.priorityOneBlocks.add(block);
        return true;
    }
    return false;
}
Also used : ProduceFarmConfiguration(com.wuest.prefab.Config.Structures.ProduceFarmConfiguration)

Aggregations

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