![JAR search and dependency download from the Maven repository](/logo.png)
cn.nukkit.block.BlockWallBanner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of powernukkit Show documentation
Show all versions of powernukkit Show documentation
A Minecraft Bedrock Edition server software implementation made in Java from scratch which supports all new features.
package cn.nukkit.block;
import cn.nukkit.api.PowerNukkitDifference;
import cn.nukkit.level.Level;
import cn.nukkit.math.BlockFace;
/**
* @author PetteriM1
*/
@PowerNukkitDifference(since = "1.4.0.0-PN", info = "Implements BlockEntityHolder only in PowerNukkit")
public class BlockWallBanner extends BlockBanner {
public BlockWallBanner() {
this(0);
}
public BlockWallBanner(int meta) {
super(meta);
}
@Override
public int getId() {
return WALL_BANNER;
}
@Override
public String getName() {
return "Wall Banner";
}
@Override
public int onUpdate(int type) {
if (type == Level.BLOCK_UPDATE_NORMAL) {
if (this.getDamage() >= BlockFace.NORTH.getIndex() && this.getDamage() <= BlockFace.EAST.getIndex()) {
if (this.getSide(BlockFace.fromIndex(this.getDamage()).getOpposite()).getId() == AIR) {
this.getLevel().useBreakOn(this);
}
return Level.BLOCK_UPDATE_NORMAL;
}
}
return 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy