Resource Invalid item blacklist

Discussion in 'Spigot Plugin Development' started by finnbon, Apr 14, 2017.

  1. Hello people!

    For something I'm working on I needed a list with materials that cannot be accessed via the creative inventory. Since there was no good way to access all itemstacks in the creative inventory, I had to make my own list. Here's the result
    Code (Text):
    AIR
    WATER
    STATIONARY_WATER
    LAVA
    STATIONARY_LAVA
    BED_BLOCK
    PISTON_EXTENSION
    PISTON_MOVING_PIECE
    FIRE
    MOB_SPAWNER
    REDSTONE_WIRE
    CROPS
    SOIL
    BURNING_FURNACE
    SIGN_POST
    WALL_SIGN
    IRON_DOOR_BLOCK
    GLOWING_REDSTONE_ORE
    REDSTONE_TORCH_OFF
    SUGAR_CANE_BLOCK
    PORTAL
    CAKE_BLOCK
    DIODE_BLOCK_OFF
    DIODE_BLOCK_ON
    HUGE_MUSHROOM_1
    HUGE_MUSHROOM_2
    PUMPKIN_STEM
    MELON_STEM
    NETHER_WARTS
    BREWING_STAND
    CAULDRON
    ENDER_PORTAL
    DRAGON_EGG
    REDSTONE_LAMP_ON
    COCOA
    TRIPWIRE
    COMMAND
    FLOWER_POT
    CARROT
    POTATO
    SKULL
    REDSTONE_COMPARATOR_OFF
    REDSTONE_COMPARATOR_ON
    BARRIER
    STANDING_BANNER
    WALL_BANNER
    WOOD_DOOR
    SPRUCE_DOOR
    BIRCH_DOOR
    JUNGLE_DOOR
    ACACIA_DOOR
    DARK_OAK_DOOR
    BEETROOT_BLOCK
    GRASS_PATH
    END_GATEWAY
    COMMAND_REPEATING
    COMMAND_CHAIN
    STRUCTURE_VOID
    STRUCTURE_BLOCK
    COMMAND_MINECART
    END_CRYSTAL
    DRAGONS_BREATH
    Code (Java):

    private static final Material[] TYPE_BLACKLSIT = new Material[] {
        Material.AIR,
        Material.WATER,
        Material.STATIONARY_WATER,
        Material.LAVA,
        Material.STATIONARY_LAVA,
        Material.BED_BLOCK,
        Material.PISTON_EXTENSION,
        Material.PISTON_MOVING_PIECE,
        Material.FIRE,
        Material.MOB_SPAWNER,
        Material.REDSTONE_WIRE,
        Material.CROPS,
        Material.SOIL,
        Material.BURNING_FURNACE,
        Material.SIGN_POST,
        Material.WALL_SIGN,
        Material.IRON_DOOR_BLOCK,
        Material.GLOWING_REDSTONE_ORE,
        Material.REDSTONE_TORCH_OFF,
        Material.SUGAR_CANE_BLOCK,
        Material.PORTAL,
        Material.CAKE_BLOCK,
        Material.DIODE_BLOCK_OFF,
        Material.DIODE_BLOCK_ON,
        Material.HUGE_MUSHROOM_1,
        Material.HUGE_MUSHROOM_2,
        Material.PUMPKIN_STEM,
        Material.MELON_STEM,
        Material.NETHER_WARTS,
        Material.BREWING_STAND,
        Material.CAULDRON,
        Material.ENDER_PORTAL,
        Material.DRAGON_EGG,
        Material.REDSTONE_LAMP_ON,
        Material.COCOA,
        Material.TRIPWIRE,
        Material.COMMAND,
        Material.FLOWER_POT,
        Material.CARROT,
        Material.POTATO,
        Material.SKULL,
        Material.REDSTONE_COMPARATOR_OFF,
        Material.REDSTONE_COMPARATOR_ON,
        Material.BARRIER,
        Material.STANDING_BANNER,
        Material.WALL_BANNER,
        Material.WOOD_DOOR,
        Material.SPRUCE_DOOR,
        Material.BIRCH_DOOR,
        Material.JUNGLE_DOOR,
        Material.ACACIA_DOOR,
        Material.DARK_OAK_DOOR,
        Material.BEETROOT_BLOCK,
        Material.GRASS_PATH,
        Material.END_GATEWAY,
        Material.COMMAND_REPEATING,
        Material.COMMAND_CHAIN,
        Material.STRUCTURE_VOID,
        Material.STRUCTURE_BLOCK,
        Material.COMMAND_MINECART,
        Material.END_CRYSTAL,
        Material.DRAGONS_BREATH,
    };

    Just a small resource that I thought some people could maybe find useful.

    - Finn
     
    • Useful Useful x 7
  2. This should be an implemented feature in spigot
     
    • Agree Agree x 1
  3. Isn't the brewing stand missing on here? o_O

    Edit: And the fower plot
     
  4. both of those can be accessed from the creative menu.
     
  5. For both of them there is an item and a block - dunno if this has effect on the material list, that's why Im asking. The type ids are different for sure. The blocks can't be obtained from creative inv.
     
    • Like Like x 1
  6. What materials would those 2 be?
     
  7. Thanks so much for this resource, will be very useful for a project we are working on.
     
    • Like Like x 1
  8. Basically i found the id's for the flowerpots, 140 is the flower pot block and 390 is the flower pot item
    And the brewing stand id's are 117 for the block and 379 for the item,
    found those ids here: http://minecraft-ids.grahamedgecombe.com
    I think, that they aren't displayed to the Material list, but they can be still accessed using getMaterial(#id); ( and yes i know that the method is deprecated ) ^^
     
    • Like Like x 1