cn.nukkit.utils.BlockColor Java Examples

The following examples show how to use cn.nukkit.utils.BlockColor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlockDoubleSlab.java    From Jupiter with GNU General Public License v3.0 6 votes vote down vote up
@Override
public BlockColor getColor() {
    switch (this.meta & 0x07) {
        case BlockDoubleSlab.STONE:
            return BlockColor.STONE_BLOCK_COLOR;
        case BlockDoubleSlab.SANDSTONE:
            return BlockColor.SAND_BLOCK_COLOR;
        case BlockDoubleSlab.WOODEN:
            return BlockColor.WOOD_BLOCK_COLOR;
        case BlockDoubleSlab.COBBLESTONE:
            return BlockColor.STONE_BLOCK_COLOR;
        case BlockDoubleSlab.BRICK:
            return BlockColor.STONE_BLOCK_COLOR;
        case BlockDoubleSlab.STONE_BRICK:
            return BlockColor.STONE_BLOCK_COLOR;
        case BlockDoubleSlab.QUARTZ:
            return BlockColor.QUARTZ_BLOCK_COLOR;
        case BlockDoubleSlab.NETHER_BRICK:
            return BlockColor.NETHERRACK_BLOCK_COLOR;

        default:
            return BlockColor.STONE_BLOCK_COLOR;     //unreachable
    }
}
 
Example #2
Source File: BlockSlabStone.java    From Jupiter with GNU General Public License v3.0 6 votes vote down vote up
@Override
public BlockColor getColor() {
    switch (this.meta & 0x07) {
        case STONE:
            return BlockColor.STONE_BLOCK_COLOR;
        case SANDSTONE:
            return BlockColor.SAND_BLOCK_COLOR;
        case WOODEN:
            return BlockColor.WOOD_BLOCK_COLOR;
        case COBBLESTONE:
            return BlockColor.STONE_BLOCK_COLOR;
        case BRICK:
            return BlockColor.STONE_BLOCK_COLOR;
        case STONE_BRICK:
            return BlockColor.STONE_BLOCK_COLOR;
        case QUARTZ:
            return BlockColor.QUARTZ_BLOCK_COLOR;
        case NETHER_BRICK:
            return BlockColor.NETHERRACK_BLOCK_COLOR;

        default:
            return BlockColor.STONE_BLOCK_COLOR;     //unreachable
    }
}
 
Example #3
Source File: BlockDoubleSlabRedSandstone.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
@Override
public BlockColor getColor() {
    switch (this.getDamage() & 0x07) {
        case 0:
            return BlockColor.ORANGE_BLOCK_COLOR;
        case 1:
            return BlockColor.PURPLE_BLOCK_COLOR;
        default:
            return BlockColor.STONE_BLOCK_COLOR;
    }
}
 
Example #4
Source File: ItemColorArmor.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Get color of Leather Item
 *
 * @return - BlockColor, or null if item has no color
 */
public BlockColor getColor() {
    if (!this.hasCompoundTag()) return null;
    CompoundTag tag = this.getNamedTag();
    if (!tag.exist("customColor")) return null;
    int rgb = tag.getInt("customColor");
    return new BlockColor(rgb);
}
 
Example #5
Source File: BlockFenceGate.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.WOOD_BLOCK_COLOR;
}
 
Example #6
Source File: Block.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public BlockColor getColor() {
    return BlockColor.VOID_BLOCK_COLOR;
}
 
Example #7
Source File: BlockCobweb.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.CLOTH_BLOCK_COLOR;
}
 
Example #8
Source File: BlockDiamond.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.DIAMOND_BLOCK_COLOR;
}
 
Example #9
Source File: BlockBeetroot.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor(){
	return new BlockColor(237, 171, 73);
}
 
Example #10
Source File: BlockSnow.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.SNOW_BLOCK_COLOR;
}
 
Example #11
Source File: BlockRedstoneWire.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.AIR_BLOCK_COLOR;
}
 
Example #12
Source File: BlockCraftingTable.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.WOOD_BLOCK_COLOR;
}
 
Example #13
Source File: BlockPumpkin.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.FOLIAGE_BLOCK_COLOR;
}
 
Example #14
Source File: BlockVine.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor(){
	return BlockColor.AIR_BLOCK_COLOR;
}
 
Example #15
Source File: BlockBookshelf.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.WOOD_BLOCK_COLOR;
}
 
Example #16
Source File: BlockObsidian.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.OBSIDIAN_BLOCK_COLOR;
}
 
Example #17
Source File: BlockGlowstone.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.AIR_BLOCK_COLOR;
}
 
Example #18
Source File: BlockSkull.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.AIR_BLOCK_COLOR;
}
 
Example #19
Source File: BlockTransparentMeta.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.TRANSPARENT_BLOCK_COLOR;
}
 
Example #20
Source File: BlockTallGrass.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.FOLIAGE_BLOCK_COLOR;
}
 
Example #21
Source File: BlockDoubleSlabWood.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.WOOD_BLOCK_COLOR;
}
 
Example #22
Source File: BlockTripWire.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor(){
	return BlockColor.AIR_BLOCK_COLOR;
}
 
Example #23
Source File: BlockBookshelf.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.WOOD_BLOCK_COLOR;
}
 
Example #24
Source File: BlockObsidian.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.OBSIDIAN_BLOCK_COLOR;
}
 
Example #25
Source File: BlockDragonEgg.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.OBSIDIAN_BLOCK_COLOR;
}
 
Example #26
Source File: BlockGlassPane.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.AIR_BLOCK_COLOR;
}
 
Example #27
Source File: BlockObsidian.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.OBSIDIAN_BLOCK_COLOR;
}
 
Example #28
Source File: DustParticle.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public DustParticle(Vector3 pos, BlockColor blockColor) {
    this(pos, blockColor.getRed(), blockColor.getGreen(), blockColor.getBlue(), blockColor.getAlpha());
}
 
Example #29
Source File: ItemDye.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Deprecated
public static BlockColor getColor(int meta) {
    return DyeColor.getByDyeData(meta).getColor();
}
 
Example #30
Source File: BlockSoulSand.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public BlockColor getColor() {
    return BlockColor.BROWN_BLOCK_COLOR;
}