use of net.minecraft.world.gen.feature.WorldGenDoublePlant in project SpongeCommon by SpongePowered.
the class DoublePlantBuilder method build.
@Override
public DoublePlant build() throws IllegalStateException {
if (this.types.isEmpty()) {
throw new IllegalStateException("Builder is missing required weighted plant types.");
}
WorldGenDoublePlant wgen = new WorldGenDoublePlant();
// Set a default just in case the weighted table is ever empty
wgen.setPlantType(EnumPlantType.GRASS);
DoublePlant populator = (DoublePlant) wgen;
populator.getPossibleTypes().addAll(this.types);
populator.setPlantsPerChunk(this.count);
populator.setSupplierOverride(this.override);
return populator;
}
Aggregations