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

net.minestom.server.instance.heightmap.MotionBlockingHeightmap Maven / Gradle / Ivy

There is a newer version: 7320437640
Show newest version
package net.minestom.server.instance.heightmap;

import net.minestom.server.instance.Chunk;
import net.minestom.server.instance.block.Block;
import org.jetbrains.annotations.NotNull;

public class MotionBlockingHeightmap extends Heightmap {
    public MotionBlockingHeightmap(Chunk attachedChunk) {
        super(attachedChunk);
    }

    @Override
    protected boolean checkBlock(@NotNull Block block) {
        return (block.isSolid() && !block.compare(Block.COBWEB) && !block.compare(Block.BAMBOO_SAPLING))
                || block.isLiquid()
                || "true".equals(block.getProperty("waterlogged"));
    }

    @Override
    public String NBTName() {
        return "MOTION_BLOCKING";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy