Additions for BetterNether

This commit is contained in:
Frank 2022-06-25 02:02:58 +02:00
parent 4307c11aab
commit decaf4af7a
4 changed files with 20 additions and 2 deletions

View file

@ -17,7 +17,6 @@ import net.minecraft.core.Holder;
import net.minecraft.core.Registry;
import net.minecraft.resources.RegistryOps;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.BiomeTags;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.BiomeSource;
import net.minecraft.world.level.biome.Climate;
@ -136,7 +135,7 @@ public class BCLibNetherBiomeSource extends BCLBiomeSource implements BiomeSourc
private static boolean isValidNetherBiome(Holder<Biome> biome, ResourceLocation location) {
return biome.unwrapKey().get().location().toString().contains("deltas");
return biome.unwrapKey().get().location().toString().contains("gravel_desert");
// return NetherBiomes.canGenerateInNether(biome.unwrapKey().get()) ||
// biome.is(BiomeTags.IS_NETHER) ||

View file

@ -418,6 +418,18 @@ public abstract class BCLFeatureBuilder<F extends Feature<FC>, FC extends Featur
.add(midHeight, state.setValue(BlockProperties.BOTTOM, false));
}
public AsBlockColumn<FF> addTopShapeUpsideDown(BlockState state, IntProvider midHeight) {
return this
.add(1, state.setValue(BlockProperties.TOP, true))
.add(midHeight, state.setValue(BlockProperties.TOP, false));
}
public AsBlockColumn<FF> addTopShape(BlockState state, IntProvider midHeight) {
return this
.add(midHeight, state.setValue(BlockProperties.TOP, false))
.add(1, state.setValue(BlockProperties.TOP, true));
}
public AsBlockColumn<FF> direction(Direction dir) {
direction = dir;
return this;

View file

@ -3,11 +3,17 @@ package org.betterx.bclib.api.v3.levelgen.features;
import org.betterx.worlds.together.tag.v3.CommonBlockTags;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate;
import net.minecraft.world.level.material.Fluids;
public class BlockPredicates {
public static final BlockPredicate ONLY_NYLIUM = BlockPredicate.matchesTag(BlockTags.NYLIUM);
public static final BlockPredicate ONLY_GRAVEL_OR_SAND = BlockPredicate.matchesBlocks(
Blocks.GRAVEL,
Blocks.SAND,
Blocks.RED_SAND
);
public static final BlockPredicate ONLY_NETHER_GROUND = BlockPredicate.matchesTag(CommonBlockTags.NETHER_TERRAIN);
public static final BlockPredicate ONLY_GROUND = BlockPredicate.matchesTag(CommonBlockTags.TERRAIN);

View file

@ -26,6 +26,7 @@ public class BlockProperties {
public static final IntegerProperty AGE = BlockStateProperties.AGE_3;
public static final IntegerProperty AGE_THREE = BlockStateProperties.AGE_2;
public static final BooleanProperty BOTTOM = BooleanProperty.create("bottom");
public static final BooleanProperty TOP = BooleanProperty.create("top");
public enum TripleShape implements StringRepresentable {
TOP("top", 0), MIDDLE("middle", 1), BOTTOM("bottom", 2);