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

cn.nukkit.level.generator.populator.helper.EnsureAround Maven / Gradle / Ivy

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

import cn.nukkit.level.format.FullChunk;

import static cn.nukkit.block.BlockID.AIR;


/**
 * @author LT_Name
 */
public interface EnsureAround {
    static boolean ensureAroundAir(int x, int y, int z, FullChunk chunk) {
        return chunk.getBlockId(x + 1, y, z) == AIR &&
                chunk.getBlockId(x - 1, y, z) == AIR &&
                chunk.getBlockId(x, y, z + 1) == AIR &&
                chunk.getBlockId(x, y, z - 1) == AIR;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy