Skip to content

Commit

Permalink
Block Predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeryn99 committed Aug 10, 2024
2 parents 314742e + 95b0231 commit a61d0f8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

import net.minecraft.core.Holder;
import net.minecraft.core.HolderGetter;
import net.minecraft.core.Vec3i;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstapContext;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.levelgen.VerticalAnchor;
import net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import net.minecraft.world.level.levelgen.placement.*;
import net.minecraft.world.level.material.Fluids;
import whocraft.tardis_refined.TardisRefined;
import whocraft.tardis_refined.registry.TRFeatureKeys;

Expand All @@ -31,7 +34,8 @@ public static void bootstrap(BootstapContext<PlacedFeature> context) {
List.of(
RarityFilter.onAverageOnceEvery(25),
InSquarePlacement.spread(),
HeightRangePlacement.uniform(VerticalAnchor.absolute(-50), VerticalAnchor.absolute(20))))
HeightRangePlacement.uniform(VerticalAnchor.absolute(-50), VerticalAnchor.absolute(20)),
BlockPredicateFilter.forPredicate(BlockPredicate.not(BlockPredicate.matchesFluids(new Vec3i(0, 5, 0), Fluids.WATER)))))
);


Expand Down

0 comments on commit a61d0f8

Please sign in to comment.