cn.nukkit.block.BlockLight 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.PowerNukkitOnly;
import cn.nukkit.item.Item;
import cn.nukkit.math.AxisAlignedBB;
public class BlockLight extends BlockTransparentMeta {
public BlockLight() {
this(0);
}
public BlockLight(int meta) {
super(meta);
}
@Override
public String getName() {
return "Light Block";
}
@Override
public int getId() {
return LIGHT_BLOCK;
}
@Override
public int getLightLevel() {
return getDamage() & 0xF;
}
@Override
public AxisAlignedBB getBoundingBox() {
return null;
}
@PowerNukkitOnly
@Override
public int getWaterloggingLevel() {
return 2;
}
@Override
public boolean canBeFlowedInto() {
return true;
}
@Override
public boolean canBeReplaced() {
return true;
}
@Override
public boolean canHarvestWithHand() {
return false;
}
@Override
public double getHardness() {
return 0;
}
@Override
public double getResistance() {
return 0;
}
@Override
public boolean canPassThrough() {
return true;
}
@Override
public Item toItem() {
return Item.get(Item.AIR);
}
}