Search in sources :

Example 1 with SkyDescriptor

use of mcjty.rftoolsdim.dimensions.description.SkyDescriptor in project RFToolsDimensions by McJty.

the class SkyDimletType method inject.

@Override
public void inject(DimletKey key, DimensionInformation dimensionInformation) {
    SkyDescriptor.Builder builder = new SkyDescriptor.Builder();
    builder.combine(dimensionInformation.getSkyDescriptor());
    SkyDescriptor newDescriptor = DimletObjectMapping.getSky(key);
    if (newDescriptor.specifiesFogColor()) {
        builder.resetFogColor();
    }
    if (newDescriptor.specifiesSkyColor()) {
        builder.resetSkyColor();
    }
    if (newDescriptor.isCloudColorGiven()) {
        builder.resetCloudColor();
    }
    builder.combine(newDescriptor);
    dimensionInformation.setSkyDescriptor(builder.build());
}
Also used : SkyDescriptor(mcjty.rftoolsdim.dimensions.description.SkyDescriptor)

Aggregations

SkyDescriptor (mcjty.rftoolsdim.dimensions.description.SkyDescriptor)1