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

cn.nukkit.level.DimensionEnum Maven / Gradle / Ivy

There is a newer version: 1.20.40-r1
Show newest version
package cn.nukkit.level;

public enum DimensionEnum {
    OVERWORLD(new DimensionData(Level.DIMENSION_OVERWORLD, -64, 319, 24)),
    NETHER(new DimensionData(Level.DIMENSION_NETHER, 0, 127, 16)),
    END(new DimensionData(Level.DIMENSION_THE_END, 0, 255, 16));

    private final DimensionData dimensionData;

    DimensionEnum(DimensionData dimensionData) {
        this.dimensionData = dimensionData;
    }

    public static DimensionData getDataFromId(int dimension) {
        for (DimensionEnum value : values()) {
            if (value.getDimensionData().getDimensionId() == dimension) {
                return value.getDimensionData();
            }
        }
        return null;
    }

    public DimensionData getDimensionData() {
        return this.dimensionData;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy