Package cn.nukkit.block
Class BlockPressurePlateBase
- All Implemented Interfaces:
BlockID
,IBlockState
,IMutableBlockState
,AxisAlignedBB
,Metadatable
,RedstoneComponent
,Cloneable
- Direct Known Subclasses:
BlockPressurePlateStone
,BlockPressurePlateWood
,BlockWeightedPressurePlateHeavy
,BlockWeightedPressurePlateLight
@PowerNukkitDifference(info="Implements RedstoneComponent and uses methods from it.",
since="1.4.0.0-PN")
public abstract class BlockPressurePlateBase
extends BlockFlowable
implements RedstoneComponent
- Since:
- 2016/1/11
- Author:
- Snake1999
-
Nested Class Summary
Nested classes/interfaces inherited from interface cn.nukkit.math.AxisAlignedBB
AxisAlignedBB.BBConsumer<T>
-
Field Summary
Fields inherited from class cn.nukkit.block.Block
CUSTOM_BLOCK_ID_MAP, DATA_BITS, DATA_MASK, DATA_SIZE, DEFAULT_AIR_FLUID_FRICTION, DEFAULT_FRICTION_FACTOR, EMPTY_ARRAY, fullList, hardness, hasMeta, ID_TO_CUSTOM_BLOCK, layer, light, lightFilter, list, MAX_BLOCK_ID, solid, transparent
Fields inherited from interface cn.nukkit.math.AxisAlignedBB
EMPTY_LIST
Fields inherited from interface cn.nukkit.block.BlockID
ACACIA_BUTTON, ACACIA_DOOR_BLOCK, ACACIA_PRESSURE_PLATE, ACACIA_STANDING_SIGN, ACACIA_TRAPDOOR, ACACIA_WALL_SIGN, ACACIA_WOOD_STAIRS, ACACIA_WOODEN_STAIRS, ACTIVATOR_RAIL, AIR, ALLOW, AMETHYST_BLOCK, AMETHYST_CLUSTER, ANCIENT_DERBRIS, ANDESITE_STAIRS, ANVIL, AZALEA, AZALEA_LEAVES, AZALEA_LEAVES_FLOWERED, BAMBOO, BAMBOO_SAPLING, BARREL, BARRIER, BASALT, BEACON, BED_BLOCK, BEDROCK, BEE_NEST, BEEHIVE, BEETROOT_BLOCK, BELL, BIG_DRIPLEAF, BIRCH_BUTTON, BIRCH_DOOR_BLOCK, BIRCH_PRESSURE_PLATE, BIRCH_STAIRS, BIRCH_STANDING_SIGN, BIRCH_TRAPDOOR, BIRCH_WALL_SIGN, BIRCH_WOOD_STAIRS, BIRCH_WOODEN_STAIRS, BLACK_CANDLE, BLACK_CANDLE_CAKE, BLACK_GLAZED_TERRACOTTA, BLACKSTONE, BLACKSTONE_DOUBLE_SLAB, BLACKSTONE_SLAB, BLACKSTONE_STAIRS, BLACKSTONE_WALL, BLAST_FURNACE, BLOCK_KELP, BLOCK_NETHER_WART_BLOCK, BLUE_CANDLE, BLUE_CANDLE_CAKE, BLUE_GLAZED_TERRACOTTA, BLUE_ICE, BONE_BLOCK, BOOKSHELF, BORDER_BLOCK, BREWING_BLOCK, BREWING_STAND_BLOCK, BRICK_STAIRS, BRICKS, BRICKS_BLOCK, BROWN_CANDLE, BROWN_CANDLE_CAKE, BROWN_GLAZED_TERRACOTTA, BROWN_MUSHROOM, BROWN_MUSHROOM_BLOCK, BUBBLE_COLUMN, BUDDING_AMETHYST, BURNING_FURNACE, BUSH, CACTUS, CAKE_BLOCK, CALCITE, CAMPFIRE_BLOCK, CANDLE, CANDLE_CAKE, CARPET, CARROT_BLOCK, CARTOGRAPHY_TABLE, CARVED_PUMPKIN, CAULDRON_BLOCK, CAVE_VINES, CAVE_VINES_BODY_WITH_BERRIES, CAVE_VINES_HEAD_WITH_BERRIES, CHAIN_BLOCK, CHAIN_COMMAND_BLOCK, CHEST, CHISELED_DEEPSLATE, CHISELED_NETHER_BRICKS, CHISELED_POLISHED_BLACKSTONE, CHORUS_FLOWER, CHORUS_PLANT, CLAY_BLOCK, COAL_BLOCK, COAL_ORE, COBBLE, COBBLE_STAIRS, COBBLE_WALL, COBBLED_DEEPSLATE, COBBLED_DEEPSLATE_DOUBLE_SLAB, COBBLED_DEEPSLATE_SLAB, COBBLED_DEEPSLATE_STAIRS, COBBLED_DEEPSLATE_WALL, COBBLESTONE, COBBLESTONE_STAIRS, COBBLESTONE_WALL, COBWEB, COCOA, COCOA_BLOCK, COMMAND_BLOCK, COMPOSTER, CONCRETE, CONCRETE_POWDER, CONCRETEPOWDER, CONDUIT, COPPER_BLOCK, COPPER_ORE, CORAL, CORAL_BLOCK, CORAL_FAN, CORAL_FAN_DEAD, CORAL_FAN_HANG, CORAL_FAN_HANG2, CORAL_FAN_HANG3, CRACKED_DEEPSLATE_BRICKS, CRACKED_DEEPSLATE_TILES, CRACKED_NETHER_BRICKS, CRACKED_POLISHED_BLACKSTONE_BRICKS, CRAFTING_TABLE, CRIMSON_BUTTON, CRIMSON_DOOR_BLOCK, CRIMSON_DOUBLE_SLAB, CRIMSON_FENCE, CRIMSON_FENCE_GATE, CRIMSON_FUNGUS, CRIMSON_HYPHAE, CRIMSON_NYLIUM, CRIMSON_PLANKS, CRIMSON_PRESSURE_PLATE, CRIMSON_ROOTS, CRIMSON_SLAB, CRIMSON_STAIRS, CRIMSON_STANDING_SIGN, CRIMSON_STEM, CRIMSON_TRAPDOOR, CRIMSON_WALL_SIGN, CRYING_OBSIDIAN, CUT_COPPER, CUT_COPPER_SLAB, CUT_COPPER_STAIRS, CYAN_CANDLE, CYAN_CANDLE_CAKE, CYAN_GLAZED_TERRACOTTA, DANDELION, DARK_OAK_BUTTON, DARK_OAK_DOOR_BLOCK, DARK_OAK_PRESSURE_PLATE, DARK_OAK_STANDING_SIGN, DARK_OAK_TRAPDOOR, DARK_OAK_WALL_SIGN, DARK_OAK_WOOD_STAIRS, DARK_OAK_WOODEN_STAIRS, DARK_PRISMARINE_STAIRS, DARKOAK_STANDING_SIGN, DARKOAK_WALL_SIGN, DAYLIGHT_DETECTOR, DAYLIGHT_DETECTOR_INVERTED, DEAD_BUSH, DEEPSLATE, DEEPSLATE_BRICK_DOUBLE_SLAB, DEEPSLATE_BRICK_SLAB, DEEPSLATE_BRICK_STAIRS, DEEPSLATE_BRICK_WALL, DEEPSLATE_BRICKS, DEEPSLATE_COAL_ORE, DEEPSLATE_COPPER_ORE, DEEPSLATE_DIAMOND_ORE, DEEPSLATE_EMERALD_ORE, DEEPSLATE_GOLD_ORE, DEEPSLATE_IRON_ORE, DEEPSLATE_LAPIS_ORE, DEEPSLATE_REDSTONE_ORE, DEEPSLATE_TILE_DOUBLE_SLAB, DEEPSLATE_TILE_SLAB, DEEPSLATE_TILE_STAIRS, DEEPSLATE_TILE_WALL, DEEPSLATE_TILES, DENY, DETECTOR_RAIL, DIAMOND_BLOCK, DIAMOND_ORE, DIORITE_STAIRS, DIRT, DIRT_WITH_ROOTS, DISPENSER, DOOR_BLOCK, DOUBLE_CUT_COPPER_SLAB, DOUBLE_MANGROVE_SLAB, DOUBLE_PLANT, DOUBLE_RED_SANDSTONE_SLAB, DOUBLE_SLAB, DOUBLE_SLABS, DOUBLE_STONE_BLOCK_SLAB, DOUBLE_STONE_BLOCK_SLAB2, DOUBLE_STONE_BLOCK_SLAB3, DOUBLE_STONE_BLOCK_SLAB4, DOUBLE_STONE_SLAB, DOUBLE_STONE_SLAB3, DOUBLE_STONE_SLAB4, DOUBLE_WOOD_SLAB, DOUBLE_WOOD_SLABS, DOUBLE_WOODEN_SLAB, DOUBLE_WOODEN_SLABS, DRAGON_EGG, DRIED_KELP_BLOCK, DRIPSTONE_BLOCK, DROPPER, EMERALD_BLOCK, EMERALD_ORE, ENCHANT_TABLE, ENCHANTING_TABLE, ENCHANTMENT_TABLE, END_BRICK_STAIRS, END_BRICKS, END_GATEWAY, END_PORTAL, END_PORTAL_FRAME, END_ROD, END_STONE, ENDER_CHEST, EXPOSED_COPPER, EXPOSED_CUT_COPPER, EXPOSED_CUT_COPPER_SLAB, EXPOSED_CUT_COPPER_STAIRS, EXPOSED_DOUBLE_CUT_COPPER_SLAB, FARMLAND, FENCE, FENCE_GATE, FENCE_GATE_ACACIA, FENCE_GATE_BIRCH, FENCE_GATE_DARK_OAK, FENCE_GATE_JUNGLE, FENCE_GATE_OAK, FENCE_GATE_SPRUCE, FIRE, FLETCHING_TABLE, FLOWER, FLOWER_POT_BLOCK, FLOWERING_AZALEA, FLOWING_LAVA, FLOWING_WATER, FROG_SPAWN, FURNACE, GILDED_BLACKSTONE, GLASS, GLASS_PANE, GLASS_PANEL, GLOW_FRAME, GLOW_LICHEN, GLOWING_OBSIDIAN, GLOWING_REDSTONE_ORE, GLOWSTONE, GLOWSTONE_BLOCK, GOLD_BLOCK, GOLD_ORE, GRANITE_STAIRS, GRASS, GRASS_PATH, GRAVEL, GRAY_CANDLE, GRAY_CANDLE_CAKE, GRAY_GLAZED_TERRACOTTA, GREEN_CANDLE, GREEN_CANDLE_CAKE, GREEN_GLAZED_TERRACOTTA, GRINDSTONE, HANGING_ROOTS, HARDENED_CLAY, HAY_BALE, HEAVY_WEIGHTED_PRESSURE_PLATE, HONEY_BLOCK, HONEYCOMB_BLOCK, HOPPER_BLOCK, ICE, ICE_FROSTED, INFESTED_DEEPSLATE, INFO_UPDATE, INFO_UPDATE2, INVISIBLE_BEDROCK, IRON_BAR, IRON_BARS, IRON_BLOCK, IRON_DOOR_BLOCK, IRON_ORE, IRON_TRAPDOOR, ITEM_FRAME_BLOCK, JACK_O_LANTERN, JIGSAW, JUKEBOX, JUNGLE_BUTTON, JUNGLE_DOOR_BLOCK, JUNGLE_PRESSURE_PLATE, JUNGLE_STAIRS, JUNGLE_STANDING_SIGN, JUNGLE_TRAPDOOR, JUNGLE_WALL_SIGN, JUNGLE_WOOD_STAIRS, JUNGLE_WOODEN_STAIRS, LADDER, LANTERN, LAPIS_BLOCK, LAPIS_ORE, LARGE_AMETHYST_BUD, LAVA, LAVA_CAULDRON, LEAVE, LEAVE2, LEAVES, LEAVES2, LECTERN, LEVER, LIGHT_BLOCK, LIGHT_BLUE_CANDLE, LIGHT_BLUE_CANDLE_CAKE, LIGHT_BLUE_GLAZED_TERRACOTTA, LIGHT_GRAY_CANDLE, LIGHT_GRAY_CANDLE_CAKE, LIGHT_WEIGHTED_PRESSURE_PLATE, LIGHTNING_ROD, LILY_PAD, LIME_CANDLE, LIME_CANDLE_CAKE, LIME_GLAZED_TERRACOTTA, LIT_BLAST_FURNACE, LIT_DEEPSLATE_REDSTONE_ORE, LIT_FURNACE, LIT_PUMPKIN, LIT_REDSTONE_LAMP, LIT_REDSTONE_ORE, LIT_SMOKER, LODESTONE, LOG, LOG2, LOOM, MAGENTA_CANDLE, MAGENTA_CANDLE_CAKE, MAGENTA_GLAZED_TERRACOTTA, MAGMA, MANGROVE_BUTTON, MANGROVE_DOOR, MANGROVE_FENCE, MANGROVE_FENCE_GATE, MANGROVE_LEAVES, MANGROVE_LOG, MANGROVE_PLANKS, MANGROVE_PRESSURE_PLATE, MANGROVE_PROPAGULE, MANGROVE_PROPAGULE_HANGING, MANGROVE_ROOTS, MANGROVE_SLAB, MANGROVE_STAIRS, MANGROVE_STANDING_SIGN, MANGROVE_TRAPDOOR, MANGROVE_WALL_SIGN, MANGROVE_WOOD, MEDIUM_AMETHYST_BUD, MELON_BLOCK, MELON_STEM, MOB_SPAWNER, MONSTER_EGG, MONSTER_SPAWNER, MOSS_BLOCK, MOSS_CARPET, MOSS_STONE, MOSSY_COBBLESTONE, MOSSY_COBBLESTONE_STAIRS, MOSSY_STONE, MOSSY_STONE_BRICK_STAIRS, MOVING_BLOCK, MUD, MUD_BRICK_DOUBLE_SLAB, MUD_BRICK_SLAB, MUD_BRICK_STAIRS, MUD_BRICK_WALL, MUD_BRICKS, MUDDY_MANGROVE_ROOTS, MYCELIUM, NETHER_BRICK_BLOCK, NETHER_BRICK_FENCE, NETHER_BRICKS, NETHER_BRICKS_STAIRS, NETHER_GOLD_ORE, NETHER_PORTAL, NETHER_REACTOR, NETHER_SPROUTS_BLOCK, NETHER_WART_BLOCK, NETHERITE_BLOCK, NETHERRACK, NETHERREACTOR, NORMAL_STONE_STAIRS, NOTEBLOCK, OAK_DOOR_BLOCK, OAK_STAIRS, OAK_WOOD_STAIRS, OAK_WOODEN_STAIRS, OBSERVER, OBSIDIAN, OCHRE_FROGLIGHT, ORANGE_CANDLE, ORANGE_CANDLE_CAKE, ORANGE_GLAZED_TERRACOTTA, OXIDIZED_COPPER, OXIDIZED_CUT_COPPER, OXIDIZED_CUT_COPPER_SLAB, OXIDIZED_CUT_COPPER_STAIRS, OXIDIZED_DOUBLE_CUT_COPPER_SLAB, PACKED_ICE, PACKED_MUD, PEARLESCENT_FROGLIGHT, PINK_CANDLE, PINK_CANDLE_CAKE, PINK_GLAZED_TERRACOTTA, PISTON, PISTON_ARM_COLLISION, PISTON_EXTENSION, PISTON_HEAD_STICKY, PLANK, PLANKS, PODZOL, POINTED_DRIPSTONE, POLISHED_ANDESITE_STAIRS, POLISHED_BASALT, POLISHED_BLACKSTONE, POLISHED_BLACKSTONE_BRICK_DOUBLE_SLAB, POLISHED_BLACKSTONE_BRICK_SLAB, POLISHED_BLACKSTONE_BRICK_STAIRS, POLISHED_BLACKSTONE_BRICK_WALL, POLISHED_BLACKSTONE_BRICKS, POLISHED_BLACKSTONE_BUTTON, POLISHED_BLACKSTONE_DOUBLE_SLAB, POLISHED_BLACKSTONE_PRESSURE_PLATE, POLISHED_BLACKSTONE_SLAB, POLISHED_BLACKSTONE_STAIRS, POLISHED_BLACKSTONE_WALL, POLISHED_DEEPSLATE, POLISHED_DEEPSLATE_DOUBLE_SLAB, POLISHED_DEEPSLATE_SLAB, POLISHED_DEEPSLATE_STAIRS, POLISHED_DEEPSLATE_WALL, POLISHED_DIORITE_STAIRS, POLISHED_GRANITE_STAIRS, POPPY, POTATO_BLOCK, POWDER_SNOW, POWERED_COMPARATOR, POWERED_RAIL, POWERED_REPEATER, PRISMARINE, PRISMARINE_BRICKS_STAIRS, PRISMARINE_STAIRS, PUMPKIN, PUMPKIN_STEM, PURPLE_CANDLE, PURPLE_CANDLE_CAKE, PURPLE_GLAZED_TERRACOTTA, PURPUR_BLOCK, PURPUR_STAIRS, QUARTZ_BLOCK, QUARTZ_BRICKS, QUARTZ_ORE, QUARTZ_STAIRS, RAIL, RAW_COPPER_BLOCK, RAW_GOLD_BLOCK, RAW_IRON_BLOCK, RED_CANDLE, RED_CANDLE_CAKE, RED_FLOWER, RED_GLAZED_TERRACOTTA, RED_MUSHROOM, RED_MUSHROOM_BLOCK, RED_NETHER_BRICK, RED_NETHER_BRICK_STAIRS, RED_SANDSTONE, RED_SANDSTONE_SLAB, RED_SANDSTONE_STAIRS, REDSTONE_BLOCK, REDSTONE_LAMP, REDSTONE_ORE, REDSTONE_TORCH, REDSTONE_WIRE, REEDS, REINFORCED_DEEPSLATE, REPEATING_COMMAND_BLOCK, RESPAWN_ANCHOR, ROSE, SAND, SANDSTONE, SANDSTONE_STAIRS, SAPLING, SAPLINGS, SCAFFOLDING, SCULK, SCULK_CATALYST, SCULK_SENSOR, SCULK_SHRIEKER, SCULK_VEIN, SEA_LANTERN, SEA_PICKLE, SEAGRASS, SHROOMLIGHT, SHULKER_BOX, SIGN_POST, SILVER_GLAZED_TERRACOTTA, SKULL_BLOCK, SLAB, SLABS, SLIME_BLOCK, SMALL_AMETHYST_BUD, SMALL_DRIPLEAF_BLOCK, SMITHING_TABLE, SMOKER, SMOOTH_BASALT, SMOOTH_QUARTZ_STAIRS, SMOOTH_RED_SANDSTONE_STAIRS, SMOOTH_SANDSTONE_STAIRS, SMOOTH_STONE, SNOW, SNOW_BLOCK, SNOW_LAYER, SOUL_CAMPFIRE_BLOCK, SOUL_FIRE, SOUL_LANTERN, SOUL_SAND, SOUL_SOIL, SOUL_TORCH, SPONGE, SPORE_BLOSSOM, SPRUCE_BUTTON, SPRUCE_DOOR_BLOCK, SPRUCE_PRESSURE_PLATE, SPRUCE_STAIRS, SPRUCE_STANDING_SIGN, SPRUCE_TRAPDOOR, SPRUCE_WALL_SIGN, SPRUCE_WOOD_STAIRS, SPRUCE_WOODEN_STAIRS, STAINED_GLASS, STAINED_GLASS_PANE, STAINED_HARDENED_CLAY, STAINED_TERRACOTTA, STANDING_BANNER, STICKY_PISTON, STICKY_PISTON_ARM_COLLISION, STILL_LAVA, STILL_WATER, STONE, STONE_BLOCK_SLAB, STONE_BLOCK_SLAB2, STONE_BLOCK_SLAB3, STONE_BLOCK_SLAB4, STONE_BRICK, STONE_BRICK_STAIRS, STONE_BRICKS, STONE_BUTTON, STONE_PRESSURE_PLATE, STONE_SLAB, STONE_SLAB3, STONE_SLAB4, STONE_STAIRS, STONE_WALL, STONEBRICK, STONECUTTER, STONECUTTER_BLOCK, STRIPPED_ACACIA_LOG, STRIPPED_BIRCH_LOG, STRIPPED_CRIMSON_HYPHAE, STRIPPED_CRIMSON_STEM, STRIPPED_DARK_OAK_LOG, STRIPPED_JUNGLE_LOG, STRIPPED_MANGROVE_LOG, STRIPPED_MANGROVE_WOOD, STRIPPED_OAK_LOG, STRIPPED_SPRUCE_LOG, STRIPPED_WARPED_HYPHAE, STRIPPED_WARPED_STEM, STRUCTURE_BLOCK, STRUCTURE_VOID, SUGARCANE_BLOCK, SWEET_BERRY_BUSH, TALL_GRASS, TARGET, TERRACOTTA, TINTED_GLASS, TNT, TORCH, TRAPDOOR, TRAPPED_CHEST, TRIP_WIRE, TRIPWIRE_HOOK, TRUNK, TRUNK2, TUFF, TURTLE_EGG, TWISTING_VINES, UNDYED_SHULKER_BOX, UNLIT_REDSTONE_TORCH, UNPOWERED_COMPARATOR, UNPOWERED_REPEATER, VERDANT_FROGLIGHT, VINE, VINES, WALL_BANNER, WALL_SIGN, WARPED_BUTTON, WARPED_DOOR_BLOCK, WARPED_DOUBLE_SLAB, WARPED_FENCE, WARPED_FENCE_GATE, WARPED_FUNGUS, WARPED_HYPHAE, WARPED_NYLIUM, WARPED_PLANKS, WARPED_PRESSURE_PLATE, WARPED_ROOTS, WARPED_SLAB, WARPED_STAIRS, WARPED_STANDING_SIGN, WARPED_STEM, WARPED_TRAPDOOR, WARPED_WALL_SIGN, WARPED_WART_BLOCK, WATER, WATER_LILY, WATERLILY, WAXED_COPPER, WAXED_CUT_COPPER, WAXED_CUT_COPPER_SLAB, WAXED_CUT_COPPER_STAIRS, WAXED_DOUBLE_CUT_COPPER_SLAB, WAXED_EXPOSED_COPPER, WAXED_EXPOSED_CUT_COPPER, WAXED_EXPOSED_CUT_COPPER_SLAB, WAXED_EXPOSED_CUT_COPPER_STAIRS, WAXED_EXPOSED_DOUBLE_CUT_COPPER_SLAB, WAXED_OXIDIZED_COPPER, WAXED_OXIDIZED_CUT_COPPER, WAXED_OXIDIZED_CUT_COPPER_SLAB, WAXED_OXIDIZED_CUT_COPPER_STAIRS, WAXED_OXIDIZED_DOUBLE_CUT_COPPER_SLAB, WAXED_WEATHERED_COPPER, WAXED_WEATHERED_CUT_COPPER, WAXED_WEATHERED_CUT_COPPER_SLAB, WAXED_WEATHERED_CUT_COPPER_STAIRS, WAXED_WEATHERED_DOUBLE_CUT_COPPER_SLAB, WEATHERED_COPPER, WEATHERED_CUT_COPPER, WEATHERED_CUT_COPPER_SLAB, WEATHERED_CUT_COPPER_STAIRS, WEATHERED_DOUBLE_CUT_COPPER_SLAB, WEEPING_VINES, WHEAT_BLOCK, WHITE_CANDLE, WHITE_CANDLE_CAKE, WHITE_GLAZED_TERRACOTTA, WITHER_ROSE, WOOD, WOOD_BARK, 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_CANDLE, YELLOW_CANDLE_CAKE, YELLOW_GLAZED_TERRACOTTA
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
protected abstract int
double
getMaxX()
double
getMaxY()
double
getMaxZ()
double
getMinX()
double
getMinY()
double
getMinZ()
The properties that fully describe all possible and valid states that this block can have.int
int
getStrongPower
(BlockFace side) int
int
getWeakPower
(BlockFace side) boolean
boolean
static boolean
isSupportValid
(Block block, BlockFace blockFace) boolean
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) Place and initialize a this block correctly in the world.protected void
protected void
protected AxisAlignedBB
void
setRedstonePower
(int power) protected void
updateState
(int oldStrength) Methods inherited from class cn.nukkit.block.BlockFlowable
breaksWhenMoved, canBeFlowedInto, getHardness, getResistance, isSolid, recalculateBoundingBox, sticksToPiston
Methods inherited from class cn.nukkit.block.BlockTransparentMeta
getColor, isTransparent
Methods inherited from class cn.nukkit.block.Block
addVelocityToEntity, afterRemoval, asItemBlock, calculateBreakTick, calculateBreakTime, calculateBreakTime, calculateIntercept, canBeActivated, canBeBrokenWith, canBeClimbed, canBePlaced, canBePulled, canBePushed, canBeReplaced, canHarvest, canRandomTick, canSilkTouch, canSticksBlock, canWaterloggingFlowInto, clone, cloneTo, cloneTo, collidesWithBB, collidesWithBB, deleteAllCustomBlock, diffusesSkyLight, diffusesSkyLight, down, down, down, east, east, east, equals, equals, equalsBlock, firstInLayers, firstInLayers, forState, get, get, get, get, get, get, get, get, get, getBigDamage, getBlock, getBlockId, getBooleanValue, getBoundingBox, getBreakTime, getBreakTime, getBurnAbility, getBurnChance, getCollisionBoundingBox, getComparatorInputOverride, getCurrentState, getCustomBlockDefinitionList, getCustomBlockMap, getDamage, getDataStorage, getDropExp, getDrops, getExactIntStorage, getFrictionFactor, getFullId, getHardness, getHugeDamage, getId, getIntValue, getItemId, getItemMaxStackSize, getLegacyDamage, getLightFilter, getLightFilter, getLightLevel, getLightLevel, getLocationHash, getMetadata, getMutableState, getName, getPassableBlockFrictionFactor, getPersistenceValue, getPropertyValue, getRuntimeId, getSaveId, getSide, getSide, getSideAtLayer, getSideAtLayer, getSignedBigDamage, getTickCachedSide, getTickCachedSide, getTickCachedSideAtLayer, getTickCachedSideAtLayer, getToolTier, getToolType, getWalkThroughExtraCost, hasComparatorInputOverride, hasEntityCollision, hasMetadata, init, initCustomBlock, isBlockChangeAllowed, isBlockChangeAllowed, isBreakable, isBreakable, isDefaultState, isFullBlock, isGettingPower, isInitializing, isLavaResistant, isNormalBlock, isSideFull, isSimpleBlock, isSolid, isSolid, isSoulSpeedCompatible, isTransparent, mustDrop, mustSilkTouch, north, north, north, onActivate, onActivate, onEntityFallOn, onNeighborChange, onProjectileHit, onTouch, position, registerBlockImplementation, registerCustomBlock, registerCustomBlock, removeMetadata, setBooleanValue, setDamage, setDamage, setDataStorage, setDataStorage, setDataStorageFromInt, setDataStorageFromInt, setIntValue, setMetadata, setPropertyValue, setState, south, south, south, tickRate, toItem, toString, up, up, up, useDefaultFallDamage, west, west, west
Methods inherited from class cn.nukkit.level.Position
abs, add, add, add, add, ceil, divide, floor, fromObject, fromObject, getChunk, getLevel, getLevelBlock, getLevelBlock, getLevelBlock, getLevelBlockAround, getLevelBlockAtLayer, getLevelBlockEntity, getLevelBlockState, getLevelBlockState, getLevelName, getLocation, getSidePos, getTickCachedLevelBlock, getTickCachedLevelBlockAtLayer, getTypedBlockEntity, getValidLevel, isValid, multiply, round, setComponents, setComponents, setLevel, setStrong, setWeak, subtract, subtract, subtract, subtract, subtract
Methods inherited from class cn.nukkit.positiontracking.NamedPosition
matchesNamedPosition
Methods inherited from class cn.nukkit.math.Vector3
asBlockVector3, asVector3f, cross, distance, distance, distanceManhattan, distanceSquared, distanceSquared, dot, equals, getAxis, getChunkSectionY, getChunkVector, getChunkX, getChunkZ, getFloorX, getFloorY, getFloorZ, getForward, getIntermediateWithXValue, getIntermediateWithYValue, getIntermediateWithZValue, getRight, getSideVec, getSouth, getUp, getWest, getX, getY, getZ, hashCode, length, lengthSquared, maxPlainDistance, maxPlainDistance, maxPlainDistance, maxPlainDistance, maxPlainDistance, normalize, rawHashCode, setComponentsAdding, setComponentsAdding, setX, setY, setZ
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface cn.nukkit.math.AxisAlignedBB
addCoord, calculateXOffset, calculateYOffset, calculateZOffset, contract, expand, forEach, getAverageEdgeLength, getOffsetBoundingBox, getOffsetBoundingBox, grow, intersectsWith, isVectorInside, isVectorInXY, isVectorInXZ, isVectorInYZ, offset, setBB, setBounds, setMaxX, setMaxY, setMaxZ, setMinX, setMinY, setMinZ, shrink
Methods inherited from interface cn.nukkit.blockstate.IBlockState
asItemBlock, getBigId, getBitSize, getBlock, getBlock, getBlock, getBlock, getBlock, getBlock, getBlock, getBlockRepairing, getBlockRepairing, getBlockRepairing, getBlockRepairing, getBlockRepairing, getBlockRepairing, getBlockRepairing, getBlockRepairing, getBooleanValue, getCheckedProperty, getCheckedPropertyValue, getIntValue, getLegacyStateId, getMinimalistStateId, getPersistenceName, getPersistenceValue, getProperty, getPropertyNames, getPropertyValue, getStateId, getUncheckedPropertyValue, getUncheckedPropertyValue
Methods inherited from interface cn.nukkit.blockstate.IMutableBlockState
setBooleanValue, setDataStorage, setDataStorageFromInt, setDataStorageFromItemBlockMeta, setIntValue, setPropertyValue, toggleBooleanProperty, toggleBooleanProperty
Methods inherited from interface cn.nukkit.utils.RedstoneComponent
updateAllAroundRedstone, updateAllAroundRedstone, updateAroundRedstone, updateAroundRedstone
-
Field Details
-
PROPERTIES
-
onPitch
protected float onPitch -
offPitch
protected float offPitch
-
-
Constructor Details
-
BlockPressurePlateBase
protected BlockPressurePlateBase() -
BlockPressurePlateBase
protected BlockPressurePlateBase(int meta)
-
-
Method Details
-
getProperties
Description copied from class:Block
The properties that fully describe all possible and valid states that this block can have.- Specified by:
getProperties
in interfaceIBlockState
- Specified by:
getProperties
in classBlockMeta
-
canPassThrough
public boolean canPassThrough()- Overrides:
canPassThrough
in classBlockFlowable
-
canHarvestWithHand
public boolean canHarvestWithHand()- Overrides:
canHarvestWithHand
in classBlock
-
getMinX
public double getMinX()- Specified by:
getMinX
in interfaceAxisAlignedBB
- Overrides:
getMinX
in classBlock
-
getMinZ
public double getMinZ()- Specified by:
getMinZ
in interfaceAxisAlignedBB
- Overrides:
getMinZ
in classBlock
-
getMinY
public double getMinY()- Specified by:
getMinY
in interfaceAxisAlignedBB
- Overrides:
getMinY
in classBlock
-
getMaxX
public double getMaxX()- Specified by:
getMaxX
in interfaceAxisAlignedBB
- Overrides:
getMaxX
in classBlock
-
getMaxZ
public double getMaxZ()- Specified by:
getMaxZ
in interfaceAxisAlignedBB
- Overrides:
getMaxZ
in classBlock
-
getMaxY
public double getMaxY()- Specified by:
getMaxY
in interfaceAxisAlignedBB
- Overrides:
getMaxY
in classBlock
-
isPowerSource
public boolean isPowerSource()- Overrides:
isPowerSource
in classBlock
-
isActivated
public boolean isActivated() -
getWaterloggingLevel
- Overrides:
getWaterloggingLevel
in classBlock
-
isSupportValid
@PowerNukkitXOnly @Since("1.6.0.0-PNX") public static boolean isSupportValid(Block block, BlockFace blockFace) -
onUpdate
@PowerNukkitDifference(info="Allow to be placed on top of the walls",since="1.3.0.0-PN") @PowerNukkitDifference(since="1.4.0.0-PN",info="Fixed support logic") public int onUpdate(int type) -
place
@PowerNukkitDifference(info="Allow to be placed on top of the walls",since="1.3.0.0-PN") @PowerNukkitDifference(since="1.4.0.0-PN",info="Fixed support logic") public boolean place(@NotNull Item item, @NotNull Block block, @NotNull Block target, @NotNull BlockFace face, double fx, double fy, double fz, Player player) Description copied from class:Block
Place and initialize a this block correctly in the world.The current instance must have level, x, y, z, and layer properties already set before calling this method.
- Overrides:
place
in classBlock
- Parameters:
item
- The item being used to place the block. Should be used as an optional reference, may mismatch the block that is being placed depending on plugin implementations.block
- The current block that is in the world and is getting replaced by this instance. It has the same x, y, z, layer, and level as this block.target
- The block that was clicked to create the place action in this block position.face
- The face that was clicked in the target blockfx
- The detailed X coordinate of the clicked target block facefy
- The detailed Y coordinate of the clicked target block facefz
- The detailed Z coordinate of the clicked target block faceplayer
- The player that is placing the block. May be null.- Returns:
true
if the block was properly place. The implementation is responsible for reverting any partial change.
-
recalculateCollisionBoundingBox
- Overrides:
recalculateCollisionBoundingBox
in classBlock
-
onEntityCollide
- Overrides:
onEntityCollide
in classBlock
-
updateState
protected void updateState(int oldStrength) -
onBreak
-
getWeakPower
- Overrides:
getWeakPower
in classBlock
-
getStrongPower
- Overrides:
getStrongPower
in classBlock
-
getRedstonePower
public int getRedstonePower() -
setRedstonePower
public void setRedstonePower(int power) -
playOnSound
protected void playOnSound() -
playOffSound
protected void playOffSound() -
computeRedstoneStrength
protected abstract int computeRedstoneStrength()
-