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

personthecat.catlib.event.world.FeatureModificationContext Maven / Gradle / Ivy

Go to download

Utilities for serialization, commands, noise generation, IO, and some new data types.

The newest version!
package personthecat.catlib.event.world;

import java.util.function.Predicate;
import net.minecraft.class_1959;
import net.minecraft.class_2378;
import net.minecraft.class_2893.class_2894;
import net.minecraft.class_2893.class_2895;
import net.minecraft.class_2922;
import net.minecraft.class_2960;
import net.minecraft.class_5312;
import net.minecraft.class_5455;
import net.minecraft.class_6796;
import net.minecraft.class_6880;
import net.minecraft.class_6885;

public abstract class FeatureModificationContext {

    public abstract class_1959 getBiome();

    public abstract class_2960 getName();

    public abstract class_2378> getCarverRegistry();

    public abstract class_2378 getFeatureRegistry();

    public abstract class_2378> getStructureRegistry();

    public abstract class_5455 getRegistryAccess();

    public abstract Iterable>> getCarvers(final class_2894 step);

    public abstract class_6885 getFeatures(final class_2895 step);

    public boolean removeCarver(final class_2960 id) {
        boolean anyRemoved = false;
        for (final class_2894 step : class_2894.values()) {
            anyRemoved |= this.removeCarver(step, id);
        }
        return anyRemoved;
    }

    public boolean removeCarver(final Predicate> predicate) {
        boolean anyRemoved = false;
        for (final class_2894 step : class_2894.values()) {
            anyRemoved |= this.removeCarver(step, predicate);
        }
        return anyRemoved;
    }

    public abstract boolean removeCarver(final class_2894 step, final class_2960 id);

    public abstract boolean removeCarver(final class_2894 step, final Predicate> predicate);

    public boolean removeFeature(final class_2960 id) {
        boolean anyRemoved = false;
        for (final class_2895 step : class_2895.values()) {
            anyRemoved |= this.removeFeature(step, id);
        }
        return anyRemoved;
    }

    public boolean removeFeature(final Predicate predicate) {
        boolean anyRemoved = false;
        for (final class_2895 step : class_2895.values()) {
            anyRemoved |= this.removeFeature(step, predicate);
        }
        return anyRemoved;
    }

    public abstract boolean removeFeature(final class_2895 step, final class_2960 id);

    public abstract boolean removeFeature(final class_2895 step, final Predicate predicate);

    public abstract void addCarver(final class_2894 step, final class_2922 carver);

    public abstract void addFeature(final class_2895 step, final class_6796 feature);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy