Mor COnverted Biomes
This commit is contained in:
parent
e52230e7e3
commit
b07aec8bb6
2 changed files with 17 additions and 4 deletions
|
@ -14,6 +14,7 @@ import com.mojang.datafixers.util.Function15;
|
|||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import java.util.Optional;
|
||||
|
@ -122,17 +123,17 @@ public abstract class ScatterFeatureConfig implements FeatureConfiguration {
|
|||
.orElse(0.5F)
|
||||
.forGetter((T cfg) -> cfg.chanceOfSpreadRadius3),
|
||||
Codec
|
||||
.intRange(1, 20)
|
||||
.intRange(1, 64)
|
||||
.fieldOf("min_height")
|
||||
.orElse(2)
|
||||
.forGetter((T cfg) -> cfg.minHeight),
|
||||
Codec
|
||||
.intRange(1, 20)
|
||||
.intRange(1, 64)
|
||||
.fieldOf("max_height")
|
||||
.orElse(7)
|
||||
.forGetter((T cfg) -> cfg.maxHeight),
|
||||
Codec
|
||||
.floatRange(0, 10)
|
||||
.floatRange(0, 16)
|
||||
.fieldOf("max_spread")
|
||||
.orElse(2f)
|
||||
.forGetter((T cfg) -> cfg.maxSpread),
|
||||
|
@ -211,6 +212,17 @@ public abstract class ScatterFeatureConfig implements FeatureConfiguration {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> tripleShape(Block s) {
|
||||
return tripleShape(s.defaultBlockState());
|
||||
}
|
||||
|
||||
public Builder<T> tripleShape(BlockState s) {
|
||||
block(s.setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.MIDDLE));
|
||||
tipBlock(s.setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.TOP));
|
||||
bottomBlock(s.setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.BOTTOM));
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> block(BlockStateProvider s) {
|
||||
this.clusterBlock = s;
|
||||
if (tipBlock == null) tipBlock = s;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.betterx.bclib.blocks;
|
||||
|
||||
import net.minecraft.util.StringRepresentable;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||
import net.minecraft.world.level.block.state.properties.EnumProperty;
|
||||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||
|
@ -22,7 +23,7 @@ public class BlockProperties {
|
|||
public static final IntegerProperty FULLNESS = IntegerProperty.create("fullness", 0, 3);
|
||||
public static final IntegerProperty COLOR = IntegerProperty.create("color", 0, 7);
|
||||
public static final IntegerProperty SIZE = IntegerProperty.create("size", 0, 7);
|
||||
public static final IntegerProperty AGE = IntegerProperty.create("age", 0, 3);
|
||||
public static final IntegerProperty AGE = BlockStateProperties.AGE_3;
|
||||
|
||||
public enum TripleShape implements StringRepresentable {
|
||||
TOP("top", 0), MIDDLE("middle", 1), BOTTOM("bottom", 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue