All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.lukebemish.biomesquisher.surface.NotPredicate Maven / Gradle / Ivy

Go to download

Allows for injection of new biomes into Minecraft's biome parameter space by "squishing" existing biomes

The newest version!
package dev.lukebemish.biomesquisher.surface;

import com.mojang.serialization.MapCodec;
import net.minecraft.world.level.levelgen.SurfaceRules;

public record NotPredicate(RulePredicate predicate) implements RulePredicate {
    public static final MapCodec CODEC = RulePredicate.CODEC.fieldOf("predicate").xmap(NotPredicate::new, NotPredicate::predicate);

    @Override
    public MapCodec codec() {
        return CODEC;
    }

    @Override
    public boolean matches(RuleModifier.Context context, SurfaceRules.RuleSource ruleSource) {
        return !predicate.matches(context, ruleSource);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy