Class MaterialData

    • Constructor Detail

      • MaterialData

        public MaterialData​(Material type)
        Deprecated.
      • MaterialData

        @Deprecated
        public MaterialData​(Material type,
                            byte data)
        Deprecated.
        Magic value
        Parameters:
        type - the type
        data - the raw data value
    • Method Detail

      • getData

        @Deprecated
        public byte getData()
        Deprecated.
        Magic value
        Gets the raw data in this material
        Returns:
        Raw data
      • setData

        @Deprecated
        public void setData​(byte data)
        Deprecated.
        Magic value
        Sets the raw data of this material
        Parameters:
        data - New raw data
      • getItemType

        public Material getItemType()
        Deprecated.
        Gets the Material that this MaterialData represents
        Returns:
        Material represented by this MaterialData
      • toItemStack

        @Deprecated
        public ItemStack toItemStack()
        Deprecated.
        this method creates an ItemStack of size 0 which is not generally useful. Consider toItemStack(int).
        Creates a new ItemStack based on this MaterialData
        Returns:
        New ItemStack containing a copy of this MaterialData
      • toItemStack

        public ItemStack toItemStack​(int amount)
        Deprecated.
        Creates a new ItemStack based on this MaterialData
        Parameters:
        amount - The stack size of the new stack
        Returns:
        New ItemStack containing a copy of this MaterialData
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object obj)
        Deprecated.
        Overrides:
        equals in class Object