cn.nukkit.block.BlockConcrete Maven / Gradle / Ivy
package cn.nukkit.block;
import cn.nukkit.api.PowerNukkitOnly;
import cn.nukkit.api.Since;
import cn.nukkit.blockproperty.BlockProperties;
import cn.nukkit.blockproperty.CommonBlockProperties;
import cn.nukkit.item.ItemTool;
import cn.nukkit.utils.BlockColor;
import cn.nukkit.utils.DyeColor;
import javax.annotation.Nonnull;
/**
* @author CreeperFace
* @since 2.6.2017
*/
public class BlockConcrete extends BlockSolidMeta {
@PowerNukkitOnly
@Since("1.5.0.0-PN")
public static final BlockProperties PROPERTIES = CommonBlockProperties.COLOR_BLOCK_PROPERTIES;
public BlockConcrete() {
this(0);
}
public BlockConcrete(int meta) {
super(meta);
}
@Override
public int getId() {
return CONCRETE;
}
@Since("1.4.0.0-PN")
@PowerNukkitOnly
@Nonnull
@Override
public BlockProperties getProperties() {
return PROPERTIES;
}
@Override
public double getResistance() {
return 9;
}
@Override
public double getHardness() {
return 1.8;
}
@Override
public String getName() {
return getDyeColor().getName() + " Concrete";
}
@Override
public int getToolType() {
return ItemTool.TYPE_PICKAXE;
}
@Override
@PowerNukkitOnly
public int getToolTier() {
return ItemTool.TIER_WOODEN;
}
@Override
public BlockColor getColor() {
return getDyeColor().getColor();
}
public DyeColor getDyeColor() {
return getPropertyValue(CommonBlockProperties.COLOR);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy