Class Item
- Direct Known Subclasses:
ItemAmethystShard
,ItemArmor
,ItemArmorStand
,ItemArrow
,ItemBanner
,ItemBannerPattern
,ItemBed
,ItemBlazePowder
,ItemBlazeRod
,ItemBlock
,ItemBoat
,ItemBone
,ItemBook
,ItemBookEnchanted
,ItemBookWritable
,ItemBowl
,ItemBrewingStand
,ItemBrick
,ItemBucket
,ItemCake
,ItemCampfire
,ItemCampfireSoul
,ItemCauldron
,ItemChain
,ItemChestBoatBase
,ItemChorusFruitPopped
,ItemClay
,ItemClock
,ItemCoal
,ItemCompass
,ItemCompassLodestone
,ItemDiamond
,ItemDiscFragment5
,ItemDoorAcacia
,ItemDoorBirch
,ItemDoorCrimson
,ItemDoorDarkOak
,ItemDoorIron
,ItemDoorJungle
,ItemDoorMangrove
,ItemDoorSpruce
,ItemDoorWarped
,ItemDoorWood
,ItemDragonBreath
,ItemDye
,ItemEchoShard
,ItemEdible
,ItemEmerald
,ItemEmptyMap
,ItemEndCrystal
,ItemEnderEye
,ItemFeather
,ItemFireCharge
,ItemFirework
,ItemFireworkStar
,ItemFlint
,ItemFlowerPot
,ItemGhastTear
,ItemGlassBottle
,ItemGlowstoneDust
,ItemGunpowder
,ItemHeartOfTheSea
,ItemHoneycomb
,ItemHopper
,ItemHorseArmorDiamond
,ItemHorseArmorGold
,ItemHorseArmorIron
,ItemHorseArmorLeather
,ItemIngotGold
,ItemIngotIron
,ItemIngotNetherite
,ItemItemFrame
,ItemItemFrameGlow
,ItemKelp
,ItemLead
,ItemLeather
,ItemMagmaCream
,ItemMap
,ItemMelonGlistering
,ItemMinecart
,ItemMinecartChest
,ItemMinecartHopper
,ItemMinecartTNT
,ItemNameTag
,ItemNautilusShell
,ItemNetherBrick
,ItemNetherSprouts
,ItemNetherStar
,ItemNetherWart
,ItemNuggetGold
,ItemNuggetIron
,ItemPainting
,ItemPaper
,ItemPhantomMembrane
,ItemPotion
,ItemPrismarineCrystals
,ItemPrismarineShard
,ItemQuartz
,ItemRabbitFoot
,ItemRabbitHide
,ItemRecord
,ItemRedstone
,ItemRedstoneComparator
,ItemRedstoneRepeater
,ItemSaddle
,ItemScrapNetherite
,ItemScute
,ItemSeedsBeetroot
,ItemSeedsMelon
,ItemSeedsPumpkin
,ItemSeedsWheat
,ItemShulkerShell
,ItemSign
,ItemSkull
,ItemSlimeball
,ItemSpawnEgg
,ItemSpiderEyeFermented
,ItemSpyglass
,ItemStick
,ItemString
,ItemSugar
,ItemSugarcane
,ItemTool
,ItemTotem
,ItemWheat
,ProjectileItem
,StringItemBase
- Author:
- MagicDroidX (Nukkit Project)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
物品锁定在玩家的物品栏 LOCK_IN_SLOT 阻止该物品被从玩家物品栏的该槽位移动、移除、丢弃或用于合成 LOCK_IN_INVENTORY 阻止该物品被从玩家的物品栏移除、丢弃或用于合成 -
Field Summary
Modifier and TypeFieldDescriptionprotected Block
int
protected int
Deprecated.static final Item[]
protected boolean
protected final int
static Class[]
protected int
protected String
static String
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
Fields inherited from interface cn.nukkit.item.ItemID
ACACIA_CHEST_BOAT, ACACIA_DOOR, ACACIA_SIGN, AMETHYST_SHARD, APPLE, ARMOR_STAND, ARROW, BAKED_POTATO, BAKED_POTATOES, BANNER, BANNER_PATTERN, BED, BEETROOT, BEETROOT_SEED, BEETROOT_SEEDS, BEETROOT_SOUP, BIRCH_CHEST_BOAT, BIRCH_DOOR, BIRCH_SIGN, BLAZE_POWDER, BLAZE_ROD, BOAT, BONE, BOOK, BOOK_AND_QUILL, BOTTLE, BOW, BOWL, BREAD, BREWING, BREWING_STAND, BRICK, BUCKET, CAKE, CAMPFIRE, CARROT, CARROT_ON_A_STICK, CARROTS, CAULDRON, CHAIN, CHAIN_BOOTS, CHAIN_CHESTPLATE, CHAIN_HELMET, CHAIN_LEGGINGS, CHEST_BOAT, CHEST_MINECART, CHORUS_FRUIT, CLAY, CLOCK, CLOWNFISH, COAL, COMMAND_BLOCK_MINECART, COMPARATOR, COMPASS, COOKED_BEEF, COOKED_CHICKEN, COOKED_FISH, COOKED_MUTTON, COOKED_PORKCHOP, COOKED_RABBIT, COOKED_SALMON, COOKIE, CRIMSON_DOOR, CRIMSON_SIGN, CROSSBOW, DARK_OAK_CHEST_BOAT, DARK_OAK_DOOR, DARK_OAK_SIGN, DARKOAK_SIGN, DIAMOND, DIAMOND_AXE, DIAMOND_BOOTS, DIAMOND_CHESTPLATE, DIAMOND_HELMET, DIAMOND_HOE, DIAMOND_HORSE_ARMOR, DIAMOND_LEGGINGS, DIAMOND_PICKAXE, DIAMOND_SHOVEL, DIAMOND_SWORD, DISC_FRAGMENT_5, DRAGON_BREATH, DRIED_KELP, DYE, ECHO_SHARD, EGG, ELYTRA, EMERALD, EMPTY_MAP, ENCHANT_BOOK, ENCHANTED_BOOK, END_CRYSTAL, ENDER_EYE, ENDER_PEARL, EXPERIENCE_BOTTLE, FEATHER, FERMENTED_SPIDER_EYE, FIRE_CHARGE, FIREWORKS, FIREWORKSCHARGE, FISHING_ROD, FLINT, FLINT_AND_STEEL, FLINT_STEEL, FLOWER_POT, GHAST_TEAR, GLASS_BOTTLE, GLISTERING_MELON, GLOW_BERRIES, GLOW_ITEM_FRAME, GLOWSTONE_DUST, GOLD_AXE, GOLD_BOOTS, GOLD_CHESTPLATE, GOLD_HELMET, GOLD_HOE, GOLD_HORSE_ARMOR, GOLD_INGOT, GOLD_LEGGINGS, GOLD_NUGGET, GOLD_PICKAXE, GOLD_SHOVEL, GOLD_SWORD, GOLDEN_APPLE, GOLDEN_APPLE_ENCHANTED, GOLDEN_AXE, GOLDEN_CARROT, GOLDEN_HOE, GOLDEN_NUGGET, GOLDEN_PICKAXE, GOLDEN_SHOVEL, GOLDEN_SWORD, GUNPOWDER, HEART_OF_THE_SEA, HONEY_BOTTLE, HONEYCOMB, HOPPER, HOPPER_MINECART, IRON_AXE, IRON_BOOTS, IRON_CHESTPLATE, IRON_DOOR, IRON_HELMET, IRON_HOE, IRON_HORSE_ARMOR, IRON_INGOT, IRON_LEGGINGS, IRON_NUGGET, IRON_PICKAXE, IRON_SHOVEL, IRON_SWORD, ITEM_FRAME, ITEM_MANGROVE_DOOR, JUNGLE_CHEST_BOAT, JUNGLE_DOOR, JUNGLE_SIGN, KELP, LEAD, LEATHER, LEATHER_BOOTS, LEATHER_CAP, LEATHER_HORSE_ARMOR, LEATHER_PANTS, LEATHER_TUNIC, LINGERING_POTION, LODESTONE_COMPASS, LODESTONECOMPASS, MAGMA_CREAM, MANGROVE_CHEST_BOAT, MANGROVE_SIGN, MAP, MELON, MELON_SEEDS, MELON_SLICE, MINECART, MINECART_WITH_CHEST, MINECART_WITH_HOPPER, MINECART_WITH_TNT, MUSHROOM_STEW, NAME_TAG, NAUTILUS_SHELL, NETHER_BRICK, NETHER_QUARTZ, NETHER_SPROUTS, NETHER_STAR, NETHER_WART, NETHERITE_AXE, NETHERITE_BOOTS, NETHERITE_CHESTPLATE, NETHERITE_HELMET, NETHERITE_HOE, NETHERITE_INGOT, NETHERITE_LEGGINGS, NETHERITE_PICKAXE, NETHERITE_SCRAP, NETHERITE_SHOVEL, NETHERITE_SWORD, OAK_CHEST_BOAT, PAINTING, PAPER, PHANTOM_MEMBRANE, POISONOUS_POTATO, POPPED_CHORUS_FRUIT, POTATO, POTATOES, POTION, PRISMARINE_CRYSTALS, PRISMARINE_SHARD, PUFFERFISH, PUMPKIN_PIE, PUMPKIN_SEEDS, QUARTZ, RABBIT_FOOT, RABBIT_HIDE, RABBIT_STEW, RAW_BEEF, RAW_CHICKEN, RAW_FISH, RAW_MUTTON, RAW_PORKCHOP, RAW_RABBIT, RAW_SALMON, RECORD_11, RECORD_13, RECORD_5, RECORD_BLOCKS, RECORD_CAT, RECORD_CHIRP, RECORD_FAR, RECORD_MALL, RECORD_MELLOHI, RECORD_OTHERSIDE, RECORD_PIGSTEP, RECORD_STAL, RECORD_STRAD, RECORD_WAIT, RECORD_WARD, REDSTONE, REDSTONE_DUST, REPEATER, ROTTEN_FLESH, SADDLE, SCUTE, SEEDS, SHEARS, SHIELD, SHULKER_SHELL, SIGN, SKULL, SLIMEBALL, SNOWBALL, SOUL_CAMPFIRE, SPAWN_EGG, SPIDER_EYE, SPLASH_POTION, SPRUCE_CHEST_BOAT, SPRUCE_DOOR, SPRUCE_SIGN, SPYGLASS, STEAK, STICK, STICKS, STONE_AXE, STONE_HOE, STONE_PICKAXE, STONE_SHOVEL, STONE_SWORD, STRING, STRING_IDENTIFIED_ITEM, SUGAR, SUGAR_CANE, SUGAR_CANES, SUGARCANE, SUSPICIOUS_STEW, SWEET_BERRIES, TNT_MINECART, TOTEM, TRIDENT, TURTLE_SHELL, WARPED_DOOR, WARPED_FUNGUS_ON_A_STICK, WARPED_SIGN, WHEAT, WHEAT_SEEDS, WOODEN_AXE, WOODEN_DOOR, WOODEN_HOE, WOODEN_PICKAXE, WOODEN_SHOVEL, WOODEN_SWORD, WRITTEN_BOOK
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCanDestroy
(Block block) 控制此方块(在冒险模式下)可以破坏的方块类型。此效果不会改变原本的破坏速度和破坏后掉落物。void
addCanDestroy
(Block[] blocks) void
addCanPlaceOn
(Block block) 控制此方块(在冒险模式下)可以使用/放置在其上的方块类型。void
addCanPlaceOn
(Block[] blocks) static void
addCreativeItem
(Item item) 添加一个物品到creative
void
addEnchantment
(Enchantment... enchantments) boolean
该物品是否可以应用附魔效果boolean
final boolean
boolean
定义物品是否可以打破盾牌static void
取消创造模式下创造背包中的物品清除物品的自定义名称clone()
创建一个通配配方物品,即该物品可以不限制数据值应用到配方中final Item
decrement
(int amount) final boolean
deepEquals
(Item item) Deprecated.final boolean
deepEquals
(Item item, boolean checkDamage) Deprecated.final boolean
deepEquals
(Item item, boolean checkDamage, boolean checkCompound) Deprecated.static void
卸载全部的自定义物品static void
deleteCustomItem
(String namespaceId) 卸载自定义物品final boolean
final boolean
判断两个物品是否相等final boolean
final boolean
equalsExact
(Item other) 返回物品堆叠是否与指定的物品堆叠有相同的ID,伤害,NBT和数量final boolean
equalsIgnoringEnchantmentOrder
(Item item, boolean checkDamage) Same asequals(Item, boolean)
but the enchantment order of the items does not affect the result.static Item
static Item
fromJsonNetworkId
(Map<String, Object> data) static Item
fromString
(String str) static Item[]
fromStringMultiple
(String str) static Item
get
(int id) static Item
static Item
static Item
int
定义物品的护甲值int
定义物品的攻击伤害getBlock()
static Item
getBlock
(int id) static Item
static Item
static Item
int
byte[]
int
getCount()
static Item
getCreativeItem
(int index) static int
getCreativeItemIndex
(Item item) 获取指定物品在creative
中的索引获取creative
int
通过附魔id来查找对应附魔的等级static HashMap<String,
CustomItemDefinition> 用于获取发送给客户端的自定义物品数据int
int
getDestroySpeed
(Block block, Player player) int
定义物品的附魔getEnchantment
(int id) 从给定的附魔id查找该物品是否存在对应的附魔效果,如果查找不到返回nullgetEnchantment
(short id) int
getEnchantmentLevel
(int id) 通过附魔id来查找对应附魔的等级获取该物品所带有的全部附魔final Short
获取一个可燃烧物品的燃烧时间int
getId()
获取项目物品列表也可以获取重构物品列表获取物品锁定在玩家的物品栏的模式String[]
getLore()
定义物品的Lore信息int
定义物品最大耐久值int
定义物品堆叠的最大数量final String
getName()
getNamedTagEntry
(String name) final int
final int
int
int
getTier()
定义物品的挖掘等级int
定义物品的盔甲韧性boolean
boolean
boolean
检测该物品是否有该附魔boolean
boolean
hasEnchantment
(int id) 检测该物品是否有该附魔boolean
boolean
hasMeta()
final Item
increment
(int amount) static void
init()
boolean
isArmor()
定义物品是否为盔甲boolean
isAxe()
定义物品是否为斧子boolean
isBoots()
定义物品是否为靴子boolean
定义物品是否为胸甲static boolean
isCreativeItem
(Item item) 检测这个物品是否存在于创造背包boolean
如果为true,这个物品可以如骨粉一样减少作物成长时间boolean
isHelmet()
定义物品是否为头盔boolean
isHoe()
定义物品是否为锄头boolean
这个物品如下界合金套一样能在岩浆上飘浮boolean
定义物品是否为护腿boolean
isNull()
boolean
定义物品是否为镐子boolean
isShears()
定义物品是否为剪刀boolean
isShovel()
定义物品是否为铲子boolean
isSword()
定义物品是否为剑boolean
isTool()
定义物品是否为工具boolean
定义物品是否不可损坏boolean
该物品是否死亡不掉落boolean
onActivate
(Level level, Player player, Block block, Block target, BlockFace face, double fx, double fy, double fz) 玩家使用一个物品交互时会调用这个方法boolean
onClickAir
(Player player, Vector3 directionVector) 玩家在空气中投掷如三叉戟一样 返回物品是否改变,例如数量变化或耐久度boolean
玩家长时间点击物品后执行代码boolean
static CompoundTag
parseCompoundTag
(byte[] tag) void
readItemJsonComponents
(Item.ItemJsonComponents components) 重构项目物品列表static OK<?>
registerCustomItem
(Class<? extends CustomItem> c) 注册自定义物品static OK<?>
registerCustomItem
(List<Class<? extends CustomItem>> itemClassList) 注册自定义物品static void
removeCreativeItem
(Item item) 移除一个指定的创造物品void
setCanDestroy
(Block[] blocks) void
setCanPlaceOn
(Block[] blocks) setCompoundTag
(byte[] tags) void
setCount
(int count) setCustomBlockData
(CompoundTag compoundTag) setCustomName
(String name) 设置物品的自定义名字void
void
void
setKeepOnDeath
(boolean keepOnDeath) 设置物品的Lore信息setNamedTag
(CompoundTag tag) setRepairCost
(int cost) final String
toString()
boolean
boolean
byte[]
-
Field Details
-
EMPTY_ARRAY
-
UNKNOWN_STR
-
list
-
block
-
id
protected final int id -
meta
protected int meta -
hasMeta
protected boolean hasMeta -
count
public int count -
durability
@Deprecated @DeprecationDetails(since="1.4.0.0-PN", by="PowerNukkit", reason="Unused", replaceWith="meta or getDamage()") protected int durabilityDeprecated. -
name
-
-
Constructor Details
-
Item
public Item(int id) -
Item
-
Item
-
Item
-
-
Method Details
-
hasMeta
public boolean hasMeta() -
canBeActivated
public boolean canBeActivated() -
init
public static void init() -
rebuildItemList
重构项目物品列表rebuild ItemList
- Returns:
-
getItemList
获取项目物品列表也可以获取重构物品列表Get the list of item items and also get the list of reconstructed items
- Returns:
-
registerCustomItem
@PowerNukkitXOnly @Since("1.6.0.0-PNX") public static OK<?> registerCustomItem(Class<? extends CustomItem> c) 注册自定义物品Register custom item
- Parameters:
c
- 传入自定义物品类的实例Import in an instance of a custom item class
-
registerCustomItem
@PowerNukkitXOnly @Since("1.6.0.0-PNX") public static OK<?> registerCustomItem(@NotNull List<Class<? extends CustomItem>> itemClassList) 注册自定义物品Register custom item
- Parameters:
itemClassList
- 传入自定义物品class List
Import custom items class List
-
deleteCustomItem
卸载自定义物品Remove custom items
- Parameters:
namespaceId
- 传入自定义物品的namespaceId
-
deleteAllCustomItem
卸载全部的自定义物品Remove all custom items
-
getCustomItems
@PowerNukkitXOnly @Since("1.6.0.0-PNX") public static HashMap<String,Supplier<? extends Item>> getCustomItems()用于获取发送给客户端的自定义物品数据Used to get the custom item data sent to the client
- Returns:
-
getCustomItemDefinition
@PowerNukkitXOnly @Since("1.19.31-r1") public static HashMap<String,CustomItemDefinition> getCustomItemDefinition() -
clearCreativeItems
public static void clearCreativeItems()取消创造模式下创造背包中的物品Cancel the Creative of items in the backpack in Creative mode
-
getCreativeItems
获取creative
Get the
creative
-
addCreativeItem
添加一个物品到creative
Add a item to
creative
-
removeCreativeItem
移除一个指定的创造物品Remove a specified created item
-
isCreativeItem
检测这个物品是否存在于创造背包Detect if the item exists in the Creative backpack
- Parameters:
item
-- Returns:
-
getCreativeItem
- Parameters:
index
-- Returns:
-
getCreativeItemIndex
获取指定物品在creative
中的索引Get the index of the specified item in
creative
- Parameters:
item
- 指定物品
specified item
-
getBlock
-
getBlock
-
getBlock
-
getBlock
-
get
-
get
-
get
-
get
@PowerNukkitDifference(info="Prevents players from getting invalid items by limiting the return to the maximum damage defined in Block.getMaxItemDamage()", since="1.4.0.0-PN") public static Item get(int id, Integer meta, int count, byte[] tags) -
fromString
@PowerNukkitDifference(since="1.4.0.0-PN", info="Improve namespaced name handling and allows to get custom blocks by name") public static Item fromString(String str) -
fromJson
-
fromJsonNetworkId
-
fromStringMultiple
-
setCompoundTag
-
setCompoundTag
-
getCompoundTag
public byte[] getCompoundTag() -
hasCompoundTag
public boolean hasCompoundTag() -
hasCustomBlockData
public boolean hasCustomBlockData() -
clearCustomBlockData
-
setCustomBlockData
-
getCustomBlockData
-
applyEnchantments
该物品是否可以应用附魔效果 -
hasEnchantments
public boolean hasEnchantments() -
getEnchantmentLevel
通过附魔id来查找对应附魔的等级Find the enchantment level by the enchantment id.
- Parameters:
id
- The enchantment ID fromEnchantment
constants.- Returns:
0
if the item don't have that enchantment or the current level of the given enchantment.
-
getCustomEnchantmentLevel
通过附魔id来查找对应附魔的等级Find the enchantment level by the enchantment id.
- Parameters:
id
- 要查询的附魔标识符- Returns:
0
if the item don't have that enchantment or the current level of the given enchantment.
-
getCustomEnchantment
- Parameters:
id
- 要查询的附魔标识符
-
hasCustomEnchantment
检测该物品是否有该附魔Detect if the item has the enchantment
- Parameters:
id
- 要查询的附魔标识符
-
getEnchantment
从给定的附魔id查找该物品是否存在对应的附魔效果,如果查找不到返回nullGet the id of the enchantment
-
getEnchantment
-
addEnchantment
-
getEnchantments
获取该物品所带有的全部附魔Get all the enchantments that the item comes with
- Returns:
- 如果没有附魔效果返回Enchantment.EMPTY_ARRAY
If there is no enchanting effect return Enchantment.EMPTY_ARRAY
-
hasEnchantment
检测该物品是否有该附魔Detect if the item has the enchantment
- Parameters:
id
- The enchantment ID fromEnchantment
constants.
-
getRepairCost
-
setRepairCost
-
hasCustomName
public boolean hasCustomName() -
getCustomName
-
setCustomName
设置物品的自定义名字Set custom names for items
- Parameters:
name
-- Returns:
-
clearCustomName
清除物品的自定义名称Clear custom name for item
- Returns:
-
getLore
定义物品的Lore信息Get the Lore information of the item
- Returns:
-
setLore
设置物品的Lore信息Set the Lore information of the item
- Parameters:
lines
-- Returns:
-
getNamedTagEntry
-
getNamedTag
-
getOrCreateNamedTag
-
setNamedTag
-
clearNamedTag
-
parseCompoundTag
-
writeCompoundTag
-
getCount
public int getCount() -
setCount
public void setCount(int count) -
isNull
public boolean isNull() -
getName
-
canBePlaced
public final boolean canBePlaced() -
getBlock
-
getBlockUnsafe
-
getId
public int getId() -
getNetworkFullId
@PowerNukkitOnly @Since("1.4.0.0-PN") public final int getNetworkFullId() throws UnknownNetworkIdException- Throws:
UnknownNetworkIdException
-
getNamespaceId
-
getBlockId
-
getDamage
public int getDamage() -
setDamage
-
createFuzzyCraftingRecipe
创建一个通配配方物品,即该物品可以不限制数据值应用到配方中Create a wildcard recipe item,the item can be applied to a recipe without restriction on data(damage/meta) values
-
getMaxStackSize
public int getMaxStackSize()定义物品堆叠的最大数量Define the maximum number of items to be stacked
- Returns:
-
getFuelTime
获取一个可燃烧物品的燃烧时间Get the burn time of a burnable item
-
useOn
-
useOn
-
isTool
public boolean isTool()定义物品是否为工具Define if this item is a tool
- Returns:
-
getMaxDurability
public int getMaxDurability()定义物品最大耐久值Define the maximum durability value of the item
- Returns:
-
getTier
public int getTier()定义物品的挖掘等级Define the item Tier level
- Returns:
-
isPickaxe
public boolean isPickaxe()定义物品是否为镐子Define if the item is a Pickaxe
- Returns:
-
isAxe
public boolean isAxe()定义物品是否为斧子Define if the item is a Axe
- Returns:
-
isSword
public boolean isSword()定义物品是否为剑Define if the item is a Sword
- Returns:
-
isShovel
public boolean isShovel()定义物品是否为铲子Define if the item is a Shovel
- Returns:
-
isHoe
public boolean isHoe()定义物品是否为锄头Define if the item is a Hoe
- Returns:
-
isShears
public boolean isShears()定义物品是否为剪刀Define if the item is a Shears
- Returns:
-
isArmor
public boolean isArmor()定义物品是否为盔甲Define if the item is a Armor
- Returns:
-
isHelmet
public boolean isHelmet()定义物品是否为头盔Define if the item is a Helmet
- Returns:
-
isChestplate
public boolean isChestplate()定义物品是否为胸甲Define if the item is a Chestplate
- Returns:
-
isLeggings
public boolean isLeggings()定义物品是否为护腿Define if the item is a Leggings
- Returns:
-
isBoots
public boolean isBoots()定义物品是否为靴子Define if the item is a Boots
- Returns:
-
getEnchantAbility
public int getEnchantAbility()定义物品的附魔Define the enchantment of an item
- Returns:
-
getAttackDamage
public int getAttackDamage()定义物品的攻击伤害Define the attackdamage of an item
- Returns:
-
getArmorPoints
public int getArmorPoints()定义物品的护甲值Define the Armour value of an item
- Returns:
-
getToughness
public int getToughness()定义物品的盔甲韧性Define the Armour Toughness of an item
- Returns:
-
isUnbreakable
public boolean isUnbreakable()定义物品是否不可损坏Define if the item is Unbreakable
- Returns:
-
isLavaResistant
这个物品如下界合金套一样能在岩浆上飘浮If the item is resistant to lava and fire and can float on lava like if it was on water.
- Since:
- 1.4.0.0-PN
-
canBreakShield
定义物品是否可以打破盾牌Define if the item can break the shield
- Returns:
-
onUse
-
onRelease
玩家长时间点击物品后执行代码Allows the item to execute code when the player releases the item after long clicking it.
- Parameters:
player
- The player who released the click button松开按钮的玩家
ticksUsed
- How many ticks the item was held.这个物品被使用多少ticks时间
- Returns:
- If an inventory contents update should be sent to the player
如果要向玩家发送库存内容的更新信息
-
toString
-
getDestroySpeed
-
onActivate
public boolean onActivate(Level level, Player player, Block block, Block target, BlockFace face, double fx, double fy, double fz) 玩家使用一个物品交互时会调用这个方法This method is called when the player interacts with an item
- Parameters:
level
- 玩家所在地图
Player location levelplayer
- 玩家实例对象
Player instance objectblock
-target
- 交互的目标方块
Interacting target blockface
- 交互的方向
Direction of Interactionfx
-fy
-fz
-- Returns:
-
decrement
-
increment
-
isFertilizer
如果为true,这个物品可以如骨粉一样减少作物成长时间When true, this item can be used to reduce growing times like a bone meal.
- Returns:
true
if it can act like a bone meal
-
onClickAir
玩家在空气中投掷如三叉戟一样 返回物品是否改变,例如数量变化或耐久度Called when a player uses the item on air, for example throwing a projectile. Returns whether the item was changed, for example count decrease or durability change.
- Parameters:
player
- playerdirectionVector
- direction- Returns:
- item changed
-
equals
-
equals
-
equals
判断两个物品是否相等- Parameters:
item
- 要比较的物品checkDamage
- 是否检查数据值checkCompound
- 是否检查NBT- Returns:
- the boolean
-
equalsExact
返回物品堆叠是否与指定的物品堆叠有相同的ID,伤害,NBT和数量Returns whether the specified item stack has the same ID, damage, NBT and count as this item stack.
- Parameters:
other
- item- Returns:
- equal
-
equalsIgnoringEnchantmentOrder
@PowerNukkitOnly @Since("1.2.1.0-PN") public final boolean equalsIgnoringEnchantmentOrder(Item item, boolean checkDamage) Same asequals(Item, boolean)
but the enchantment order of the items does not affect the result.- Since:
- 1.2.1.0-PN
-
deepEquals
Deprecated. -
deepEquals
Deprecated. -
deepEquals
Deprecated. -
clone
-
getNetworkId
- Throws:
UnknownNetworkIdException
-
addCanPlaceOn
控制此方块(在冒险模式下)可以使用/放置在其上的方块类型。Controls what block types this block may be placed on.
-
addCanPlaceOn
-
setCanPlaceOn
-
getCanPlaceOn
-
addCanDestroy
控制此方块(在冒险模式下)可以破坏的方块类型。此效果不会改变原本的破坏速度和破坏后掉落物。Controls what block types can destroy
- Parameters:
block
-
-
addCanDestroy
-
setCanDestroy
-
getCanDestroy
-
setItemLockMode
-
getItemLockMode
获取物品锁定在玩家的物品栏的模式Get items locked mode in the player's item inventory
- Returns:
-
setKeepOnDeath
-
keepOnDeath
该物品是否死亡不掉落Define if the item does not drop on death
- Returns:
-
readItemJsonComponents
@PowerNukkitXOnly @Since("1.6.0.0-PNX") public void readItemJsonComponents(Item.ItemJsonComponents components)
-