Skip to content

Latest commit

 

History

History
547 lines (547 loc) · 34.8 KB

cn.nukkit.block.Block.md

File metadata and controls

547 lines (547 loc) · 34.8 KB
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface cn.nukkit.math.AxisAlignedBB

        AxisAlignedBB.BBConsumer<T>
  • 成员变量一览

    成员变量 
    修饰符和类 成员变量描述
    static Block[] fullList 
    static double[] hardness 
    static boolean[] hasMeta
    if a block has can have variants
    static int[] light 
    static int[] lightFilter 
    static Class[] list 
    static boolean[] solid 
    static boolean[] transparent 
    • 继承自类 cn.nukkit.level.Position

      level
    • 继承自类 cn.nukkit.math.Vector3

      x, y, z
    • 继承自接口 cn.nukkit.block.BlockID

      ACACIA_DOOR_BLOCK, ACACIA_WOOD_STAIRS, ACACIA_WOODEN_STAIRS, ACTIVATOR_RAIL, AIR, ANVIL, BEACON, BED_BLOCK, BEDROCK, BEETROOT_BLOCK, BIRCH_DOOR_BLOCK, BIRCH_WOOD_STAIRS, BIRCH_WOODEN_STAIRS, BLACK_GLAZED_TERRACOTTA, BLOCK_NETHER_WART_BLOCK, BLUE_GLAZED_TERRACOTTA, BONE_BLOCK, BOOKSHELF, BREWING_BLOCK, BREWING_STAND_BLOCK, BRICK_STAIRS, BRICKS, BRICKS_BLOCK, BROWN_GLAZED_TERRACOTTA, BROWN_MUSHROOM, BROWN_MUSHROOM_BLOCK, BURNING_FURNACE, BUSH, CACTUS, CAKE_BLOCK, CARPET, CARROT_BLOCK, CAULDRON_BLOCK, CHEST, CHORUS_FLOWER, CHORUS_PLANT, CLAY_BLOCK, COAL_BLOCK, COAL_ORE, COBBLE, COBBLE_STAIRS, COBBLE_WALL, COBBLESTONE, COBBLESTONE_STAIRS, COBBLESTONE_WALL, COBWEB, COCOA, COCOA_BLOCK, CONCRETE, CONCRETE_POWDER, CRAFTING_TABLE, CYAN_GLAZED_TERRACOTTA, DANDELION, DARK_OAK_DOOR_BLOCK, DARK_OAK_WOOD_STAIRS, DARK_OAK_WOODEN_STAIRS, DAYLIGHT_DETECTOR, DAYLIGHT_DETECTOR_INVERTED, DEAD_BUSH, DETECTOR_RAIL, DIAMOND_BLOCK, DIAMOND_ORE, DIRT, DISPENSER, DOOR_BLOCK, DOUBLE_PLANT, DOUBLE_RED_SANDSTONE_SLAB, DOUBLE_SLAB, DOUBLE_SLABS, DOUBLE_STONE_SLAB, DOUBLE_WOOD_SLAB, DOUBLE_WOOD_SLABS, DOUBLE_WOODEN_SLAB, DOUBLE_WOODEN_SLABS, DRAGON_EGG, DROPPER, EMERALD_BLOCK, EMERALD_ORE, ENCHANT_TABLE, ENCHANTING_TABLE, ENCHANTMENT_TABLE, END_BRICKS, END_GATEWAY, END_PORTAL, END_PORTAL_FRAME, END_ROD, END_STONE, ENDER_CHEST, FARMLAND, FENCE, FENCE_GATE, FENCE_GATE_ACACIA, FENCE_GATE_BIRCH, FENCE_GATE_DARK_OAK, FENCE_GATE_JUNGLE, FENCE_GATE_OAK, FENCE_GATE_SPRUCE, FIRE, FLOWER, FLOWER_POT_BLOCK, FURNACE, GLASS, GLASS_PANE, GLASS_PANEL, GLOWING_OBSIDIAN, GLOWING_REDSTONE_ORE, GLOWSTONE, GLOWSTONE_BLOCK, GOLD_BLOCK, GOLD_ORE, GRASS, GRASS_PATH, GRAVEL, GRAY_GLAZED_TERRACOTTA, GREEN_GLAZED_TERRACOTTA, HAY_BALE, HEAVY_WEIGHTED_PRESSURE_PLATE, HOPPER_BLOCK, ICE, ICE_FROSTED, INVISIBLE_BEDROCK, IRON_BAR, IRON_BARS, IRON_BLOCK, IRON_DOOR_BLOCK, IRON_ORE, IRON_TRAPDOOR, ITEM_FRAME_BLOCK, JACK_O_LANTERN, JUKEBOX, JUNGLE_DOOR_BLOCK, JUNGLE_WOOD_STAIRS, JUNGLE_WOODEN_STAIRS, LADDER, LAPIS_BLOCK, LAPIS_ORE, LAVA, LEAVE, LEAVE2, LEAVES, LEAVES2, LEVER, LIGHT_BLUE_GLAZED_TERRACOTTA, LIGHT_WEIGHTED_PRESSURE_PLATE, LILY_PAD, LIME_GLAZED_TERRACOTTA, LIT_FURNACE, LIT_PUMPKIN, LIT_REDSTONE_LAMP, LIT_REDSTONE_ORE, LOG, LOG2, MAGENTA_GLAZED_TERRACOTTA, MAGMA, MELON_BLOCK, MELON_STEM, MONSTER_EGG, MONSTER_SPAWNER, MOSS_STONE, MOSSY_STONE, MYCELIUM, NETHER_BRICK_BLOCK, NETHER_BRICK_FENCE, NETHER_BRICKS, NETHER_BRICKS_STAIRS, NETHER_PORTAL, NETHER_REACTOR, NETHER_WART_BLOCK, NETHERRACK, NOTEBLOCK, OAK_WOOD_STAIRS, OAK_WOODEN_STAIRS, OBSERVER, OBSIDIAN, ORANGE_GLAZED_TERRACOTTA, PACKED_ICE, PINK_GLAZED_TERRACOTTA, PISTON, PISTON_EXTENSION, PISTON_HEAD, PLANK, PLANKS, PODZOL, POPPY, POTATO_BLOCK, POWERED_COMPARATOR, POWERED_RAIL, POWERED_REPEATER, PRISMARINE, PUMPKIN, PUMPKIN_STEM, PURPLE_GLAZED_TERRACOTTA, PURPUR_BLOCK, PURPUR_STAIRS, QUARTZ_BLOCK, QUARTZ_ORE, QUARTZ_STAIRS, RAIL, RED_FLOWER, RED_GLAZED_TERRACOTTA, RED_MUSHROOM, RED_MUSHROOM_BLOCK, RED_NETHER_BRICK, RED_SANDSTONE, RED_SANDSTONE_SLAB, RED_SANDSTONE_STAIRS, REDSTONE_BLOCK, REDSTONE_LAMP, REDSTONE_ORE, REDSTONE_TORCH, REDSTONE_WIRE, REEDS, ROSE, SAND, SANDSTONE, SANDSTONE_STAIRS, SAPLING, SAPLINGS, SEA_LANTERN, SHULKER_BOX, SIGN_POST, SILVER_GLAZED_TERRACOTTA, SKULL_BLOCK, SLAB, SLABS, SLIME_BLOCK, SNOW, SNOW_BLOCK, SNOW_LAYER, SOUL_SAND, SPONGE, SPRUCE_DOOR_BLOCK, SPRUCE_WOOD_STAIRS, SPRUCE_WOODEN_STAIRS, STAINED_GLASS, STAINED_GLASS_PANE, STAINED_HARDENED_CLAY, STAINED_TERRACOTTA, STANDING_BANNER, STICKY_PISTON, STILL_LAVA, STILL_WATER, STONE, STONE_BRICK, STONE_BRICK_STAIRS, STONE_BRICKS, STONE_BUTTON, STONE_PRESSURE_PLATE, STONE_SLAB, STONE_WALL, STONECUTTER, SUGARCANE_BLOCK, TALL_GRASS, TERRACOTTA, TNT, TORCH, TRAPDOOR, TRAPPED_CHEST, TRIPWIRE, TRIPWIRE_HOOK, TRUNK, TRUNK2, UNDYED_SHULKER_BOX, UNLIT_REDSTONE_TORCH, UNPOWERED_COMPARATOR, UNPOWERED_REPEATER, VINE, VINES, WALL_BANNER, WALL_SIGN, WATER, WATER_LILY, WHEAT_BLOCK, WHITE_GLAZED_TERRACOTTA, WOOD, WOOD_DOOR_BLOCK, WOOD_SLAB, WOOD_SLABS, WOOD_STAIRS, WOOD2, WOODEN_BUTTON, WOODEN_DOOR_BLOCK, WOODEN_PLANK, WOODEN_PLANKS, WOODEN_PRESSURE_PLATE, WOODEN_SLAB, WOODEN_SLABS, WOODEN_STAIRS, WOOL, WORKBENCH, YELLOW_GLAZED_TERRACOTTA
  • 构造函数一览

    构造函数 
    Modifier Constructor and Description
    protected Block() 
  • 成员函数一览

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
    修饰符和类 成员函数描述
    void addVelocityToEntity(Entity entity, Vector3 vector) 
    MovingObjectPosition calculateIntercept(Vector3 pos1, Vector3 pos2) 
    boolean canBeActivated() 
    boolean canBeBrokenWith(Item item) 
    boolean canBeClimbed() 
    boolean canBeFlowedInto() 
    boolean canBePlaced() 
    boolean canBePushed() 
    boolean canBeReplaced() 
    boolean canHarvestWithHand() 
    boolean canPassThrough() 
    boolean canSilkTouch() 
    Block clone() 
    boolean collidesWithBB(AxisAlignedBB bb) 
    boolean collidesWithBB(AxisAlignedBB bb, boolean collisionBB) 
    Block down() 
    Block down(int step) 
    Block east() 
    Block east(int step) 
    static boolean equals(Block b1, Block b2) 
    static boolean equals(Block b1, Block b2, boolean checkDamage) 
    static Block get(int id) 
    static Block get(int id, int data) 
    static Block get(int id, Integer meta) 
    static Block get(int id, Integer meta, Position pos) 
    static Block get(int fullId, Level level, int x, int y, int z) 
    AxisAlignedBB getBoundingBox() 
    double getBreakTime(Item item)
    此函数已弃用
    This function is lack of Player class and is not accurate enough, use #getBreakTime(Item, Player)
    double getBreakTime(Item item, Player player) 
    int getBurnAbility() 
    int getBurnChance() 
    AxisAlignedBB getCollisionBoundingBox() 
    BlockColor getColor() 
    int getComparatorInputOverride() 
    int getDamage() 
    int getDropExp() 
    Item[] getDrops(Item item) 
    double getFrictionFactor() 
    int getFullId()
    The full id is a combination of the id and data.
    double getHardness() 
    abstract int getId() 
    int getLightLevel() 
    String getLocationHash() 
    double getMaxX() 
    double getMaxY() 
    double getMaxZ() 
    List<MetadataValue> getMetadata(String metadataKey) 
    double getMinX() 
    double getMinY() 
    double getMinZ() 
    abstract String getName() 
    double getResistance() 
    String getSaveId() 
    Block getSide(BlockFace face) 
    Block getSide(BlockFace face, int step) 
    int getStrongPower(BlockFace side) 
    int getToolType() 
    int getWeakPower(BlockFace face) 
    boolean hasComparatorInputOverride() 
    boolean hasEntityCollision() 
    boolean hasMetadata(String metadataKey) 
    static void init() 
    boolean isBreakable(Item item) 
    boolean isNormalBlock() 
    boolean isPowerSource() 
    boolean isSolid() 
    boolean isTransparent() 
    Block north() 
    Block north(int step) 
    boolean onActivate(Item item) 
    boolean onActivate(Item item, Player player) 
    boolean onBreak(Item item) 
    void onEntityCollide(Entity entity) 
    int onUpdate(int type) 
    boolean place(Item item, Block block, Block target, BlockFace face, double fx, double fy, double fz, Player player) 
    void position(Position v) 
    protected AxisAlignedBB recalculateBoundingBox() 
    protected AxisAlignedBB recalculateCollisionBoundingBox() 
    void removeMetadata(String metadataKey, Plugin owningPlugin) 
    void setDamage(int meta) 
    void setDamage(Integer meta) 
    void setMetadata(String metadataKey, MetadataValue newMetadataValue) 
    Block south() 
    Block south(int step) 
    int tickRate() 
    Item toItem() 
    String toString() 
    Block up() 
    Block up(int step) 
    Block west() 
    Block west(int step) 
    • 继承自类 cn.nukkit.level.Position

      abs, add, add, add, add, ceil, divide, floor, fromObject, fromObject, getChunk, getLevel, getLevelBlock, getLocation, isValid, multiply, round, setComponents, setLevel, setStrong, setWeak, subtract, subtract, subtract, subtract, subtract
    • 继承自类 cn.nukkit.math.Vector3

      asBlockVector3, asVector3f, cross, distance, distanceSquared, dot, equals, getChunkX, getChunkZ, getFloorX, getFloorY, getFloorZ, getForward, getIntermediateWithXValue, getIntermediateWithYValue, getIntermediateWithZValue, getRight, getSouth, getUp, getWest, getX, getY, getZ, hashCode, length, lengthSquared, maxPlainDistance, maxPlainDistance, maxPlainDistance, maxPlainDistance, maxPlainDistance, normalize, rawHashCode
    • 继承自类 java.lang.Object

      finalize, getClass, notify, notifyAll, wait, wait, wait
    • 继承自接口 cn.nukkit.math.AxisAlignedBB

      addCoord, calculateXOffset, calculateYOffset, calculateZOffset, contract, expand, forEach, getAverageEdgeLength, getOffsetBoundingBox, grow, intersectsWith, isVectorInside, isVectorInXY, isVectorInXZ, isVectorInYZ, offset, setBB, setBounds, setMaxX, setMaxY, setMaxZ, setMinX, setMinY, setMinZ, shrink