Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.material.MaterialData Class Reference
Inheritance diagram for org.bukkit.material.MaterialData:
org.bukkit.material.Bed org.bukkit.material.Cake org.bukkit.material.Cauldron org.bukkit.material.Coal org.bukkit.material.CocoaPlant org.bukkit.material.Command org.bukkit.material.Crops org.bukkit.material.Diode org.bukkit.material.DirectionalContainer org.bukkit.material.Door org.bukkit.material.Dye org.bukkit.material.FlowerPot org.bukkit.material.Gate org.bukkit.material.Leaves org.bukkit.material.LongGrass org.bukkit.material.Mushroom org.bukkit.material.NetherWarts org.bukkit.material.PistonBaseMaterial org.bukkit.material.PistonExtensionMaterial org.bukkit.material.PressurePlate org.bukkit.material.Pumpkin org.bukkit.material.Rails org.bukkit.material.RedstoneWire org.bukkit.material.Sandstone org.bukkit.material.Sign org.bukkit.material.SimpleAttachableMaterialData org.bukkit.material.Skull org.bukkit.material.SpawnEgg org.bukkit.material.Stairs org.bukkit.material.TexturedMaterial org.bukkit.material.Tree org.bukkit.material.Tripwire org.bukkit.material.Vine org.bukkit.material.WoodenStep org.bukkit.material.Wool

Public Member Functions

 MaterialData (final int type)
 
 MaterialData (final Material type)
 
 MaterialData (final int type, final byte data)
 
 MaterialData (final Material type, final byte data)
 
byte getData ()
 
void setData (byte data)
 
Material getItemType ()
 
int getItemTypeId ()
 
ItemStack toItemStack ()
 
ItemStack toItemStack (int amount)
 
String toString ()
 
int hashCode ()
 
boolean equals (Object obj)
 
MaterialData clone ()
 

Detailed Description

Handles specific metadata for certain items or blocks

Definition at line 9 of file MaterialData.java.

Constructor & Destructor Documentation

org.bukkit.material.MaterialData.MaterialData ( final int  type)
Deprecated:
Magic value

Definition at line 18 of file MaterialData.java.

Referenced by org.bukkit.material.FlowerPot.getContents().

18  {
19  this(type, (byte) 0);
20  }
org.bukkit.material.MaterialData.MaterialData ( final int  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 31 of file MaterialData.java.

31  {
32  this.type = type;
33  this.data = data;
34  }
org.bukkit.material.MaterialData.MaterialData ( final Material  type,
final byte  data 
)
Deprecated:
Magic value

Definition at line 41 of file MaterialData.java.

References org.bukkit.Material.getId().

41  {
42  this(type.getId(), data);
43  }

Member Function Documentation

byte org.bukkit.material.MaterialData.getData ( )

Gets the raw data in this material

Returns
Raw data
Deprecated:
Magic value

Definition at line 52 of file MaterialData.java.

Referenced by org.bukkit.inventory.ShapelessRecipe.addIngredient(), org.bukkit.inventory.FurnaceRecipe.FurnaceRecipe(), org.bukkit.material.Stairs.getAscendingDirection(), org.bukkit.material.Ladder.getAttachedFace(), org.bukkit.material.Torch.getAttachedFace(), org.bukkit.material.Sign.getAttachedFace(), org.bukkit.material.Lever.getAttachedFace(), org.bukkit.material.Button.getAttachedFace(), org.bukkit.material.TrapDoor.getAttachedFace(), org.bukkit.material.TripwireHook.getAttachedFace(), org.bukkit.material.Dye.getColor(), org.bukkit.material.Wool.getColor(), org.bukkit.material.FlowerPot.getContents(), org.bukkit.material.ExtendedRails.getConvertedData(), org.bukkit.material.Rails.getConvertedData(), org.bukkit.material.Diode.getDelay(), org.bukkit.material.Tree.getDirection(), org.bukkit.material.Gate.getFacing(), org.bukkit.material.PistonBaseMaterial.getFacing(), org.bukkit.material.PistonExtensionMaterial.getFacing(), org.bukkit.material.DirectionalContainer.getFacing(), org.bukkit.material.Skull.getFacing(), org.bukkit.material.Dispenser.getFacing(), org.bukkit.material.Pumpkin.getFacing(), org.bukkit.material.Sign.getFacing(), org.bukkit.material.Diode.getFacing(), org.bukkit.material.CocoaPlant.getFacing(), org.bukkit.material.Bed.getFacing(), org.bukkit.material.Door.getFacing(), org.bukkit.material.Door.getHingeCorner(), org.bukkit.material.CocoaPlant.getSize(), org.bukkit.material.Cake.getSlicesEaten(), org.bukkit.material.Cake.getSlicesRemaining(), org.bukkit.material.SpawnEgg.getSpawnedType(), org.bukkit.material.Leaves.getSpecies(), org.bukkit.material.LongGrass.getSpecies(), org.bukkit.material.WoodenStep.getSpecies(), org.bukkit.material.Tree.getSpecies(), org.bukkit.material.Crops.getState(), org.bukkit.material.NetherWarts.getState(), org.bukkit.material.TexturedMaterial.getTextureIndex(), org.bukkit.material.Step.getTextureIndex(), org.bukkit.material.Sandstone.getType(), org.bukkit.material.Coal.getType(), org.bukkit.material.Tripwire.isActivated(), org.bukkit.material.TripwireHook.isActivated(), org.bukkit.material.TripwireHook.isConnected(), org.bukkit.material.Cauldron.isEmpty(), org.bukkit.material.Mushroom.isFacePainted(), org.bukkit.material.Cauldron.isFull(), org.bukkit.material.Bed.isHeadOfBed(), org.bukkit.material.TrapDoor.isInverted(), org.bukkit.material.Step.isInverted(), org.bukkit.material.WoodenStep.isInverted(), org.bukkit.material.Stairs.isInverted(), org.bukkit.material.Tripwire.isObjectTriggering(), org.bukkit.material.Vine.isOnFace(), org.bukkit.material.TrapDoor.isOpen(), org.bukkit.material.Door.isOpen(), org.bukkit.material.Gate.isOpen(), org.bukkit.material.PoweredRail.isPowered(), org.bukkit.material.RedstoneWire.isPowered(), org.bukkit.material.Command.isPowered(), org.bukkit.material.Button.isPowered(), org.bukkit.material.Lever.isPowered(), org.bukkit.material.PistonBaseMaterial.isPowered(), org.bukkit.material.Mushroom.isStem(), org.bukkit.material.PistonExtensionMaterial.isSticky(), org.bukkit.material.Door.isTopHalf(), org.bukkit.inventory.ItemStack.ItemStack(), org.bukkit.material.Vine.putOnFace(), org.bukkit.material.Vine.removeFromFace(), org.bukkit.inventory.ShapelessRecipe.removeIngredient(), org.bukkit.material.Tripwire.setActivated(), org.bukkit.material.TripwireHook.setActivated(), org.bukkit.material.TripwireHook.setConnected(), org.bukkit.material.Diode.setDelay(), org.bukkit.material.Tree.setDirection(), org.bukkit.material.Mushroom.setFacePainted(), org.bukkit.material.Gate.setFacingDirection(), org.bukkit.material.PistonBaseMaterial.setFacingDirection(), org.bukkit.material.PistonExtensionMaterial.setFacingDirection(), org.bukkit.material.Stairs.setFacingDirection(), org.bukkit.material.TripwireHook.setFacingDirection(), org.bukkit.material.CocoaPlant.setFacingDirection(), org.bukkit.material.Button.setFacingDirection(), org.bukkit.material.Lever.setFacingDirection(), org.bukkit.material.TrapDoor.setFacingDirection(), org.bukkit.material.Door.setFacingDirection(), org.bukkit.material.Bed.setHeadOfBed(), org.bukkit.inventory.ShapedRecipe.setIngredient(), org.bukkit.inventory.FurnaceRecipe.setInput(), org.bukkit.material.TrapDoor.setInverted(), org.bukkit.material.Step.setInverted(), org.bukkit.material.WoodenStep.setInverted(), org.bukkit.material.Stairs.setInverted(), org.bukkit.material.Tripwire.setObjectTriggering(), org.bukkit.material.TrapDoor.setOpen(), org.bukkit.material.Door.setOpen(), org.bukkit.material.Gate.setOpen(), org.bukkit.material.PoweredRail.setPowered(), org.bukkit.material.Command.setPowered(), org.bukkit.material.Lever.setPowered(), org.bukkit.material.Button.setPowered(), org.bukkit.material.PistonBaseMaterial.setPowered(), org.bukkit.material.CocoaPlant.setSize(), org.bukkit.material.WoodenStep.setSpecies(), org.bukkit.material.Tree.setSpecies(), org.bukkit.material.PistonExtensionMaterial.setSticky(), org.bukkit.material.Step.setTextureIndex(), and org.bukkit.material.Door.setTopHalf().

52  {
53  return data;
54  }
int org.bukkit.material.MaterialData.getItemTypeId ( )

Gets the Material Id that this MaterialData represents

Returns
Material Id represented by this MaterialData
Deprecated:
Magic value

Definition at line 83 of file MaterialData.java.

83  {
84  return type;
85  }
void org.bukkit.material.MaterialData.setData ( byte  data)

Sets the raw data of this material

Parameters
dataNew raw data
Deprecated:
Magic value

Definition at line 63 of file MaterialData.java.

Referenced by org.bukkit.material.Vine.putOnFace(), org.bukkit.material.Vine.removeFromFace(), org.bukkit.material.Tripwire.setActivated(), org.bukkit.material.TripwireHook.setActivated(), org.bukkit.material.Dye.setColor(), org.bukkit.material.Wool.setColor(), org.bukkit.material.TripwireHook.setConnected(), org.bukkit.material.FlowerPot.setContents(), org.bukkit.material.Diode.setDelay(), org.bukkit.material.Tree.setDirection(), org.bukkit.material.Rails.setDirection(), org.bukkit.material.Mushroom.setFacePainted(), org.bukkit.material.Gate.setFacingDirection(), org.bukkit.material.PistonExtensionMaterial.setFacingDirection(), org.bukkit.material.DirectionalContainer.setFacingDirection(), org.bukkit.material.PistonBaseMaterial.setFacingDirection(), org.bukkit.material.Dispenser.setFacingDirection(), org.bukkit.material.Skull.setFacingDirection(), org.bukkit.material.Pumpkin.setFacingDirection(), org.bukkit.material.Diode.setFacingDirection(), org.bukkit.material.Torch.setFacingDirection(), org.bukkit.material.Ladder.setFacingDirection(), org.bukkit.material.Stairs.setFacingDirection(), org.bukkit.material.Bed.setFacingDirection(), org.bukkit.material.TripwireHook.setFacingDirection(), org.bukkit.material.CocoaPlant.setFacingDirection(), org.bukkit.material.Button.setFacingDirection(), org.bukkit.material.Lever.setFacingDirection(), org.bukkit.material.TrapDoor.setFacingDirection(), org.bukkit.material.Door.setFacingDirection(), org.bukkit.material.Sign.setFacingDirection(), org.bukkit.material.Bed.setHeadOfBed(), org.bukkit.material.TrapDoor.setInverted(), org.bukkit.material.Step.setInverted(), org.bukkit.material.WoodenStep.setInverted(), org.bukkit.material.Stairs.setInverted(), org.bukkit.material.Tripwire.setObjectTriggering(), org.bukkit.material.TrapDoor.setOpen(), org.bukkit.material.Door.setOpen(), org.bukkit.material.Gate.setOpen(), org.bukkit.material.PoweredRail.setPowered(), org.bukkit.material.Command.setPowered(), org.bukkit.material.Lever.setPowered(), org.bukkit.material.Button.setPowered(), org.bukkit.material.PistonBaseMaterial.setPowered(), org.bukkit.material.CocoaPlant.setSize(), org.bukkit.material.Cake.setSlicesEaten(), org.bukkit.material.Cake.setSlicesRemaining(), org.bukkit.material.SpawnEgg.setSpawnedType(), org.bukkit.material.Leaves.setSpecies(), org.bukkit.material.LongGrass.setSpecies(), org.bukkit.material.WoodenStep.setSpecies(), org.bukkit.material.Tree.setSpecies(), org.bukkit.material.Crops.setState(), org.bukkit.material.NetherWarts.setState(), org.bukkit.material.Mushroom.setStem(), org.bukkit.material.PistonExtensionMaterial.setSticky(), org.bukkit.material.TexturedMaterial.setTextureIndex(), org.bukkit.material.Step.setTextureIndex(), org.bukkit.material.Door.setTopHalf(), org.bukkit.material.Sandstone.setType(), and org.bukkit.material.Coal.setType().

63  {
64  this.data = data;
65  }
ItemStack org.bukkit.material.MaterialData.toItemStack ( )

Creates a new ItemStack based on this MaterialData

Returns
New ItemStack containing a copy of this MaterialData

Definition at line 92 of file MaterialData.java.

92  {
93  return new ItemStack(type, 0, data);
94  }
ItemStack org.bukkit.material.MaterialData.toItemStack ( int  amount)

Creates a new ItemStack based on this MaterialData

Parameters
amountThe stack size of the new stack
Returns
New ItemStack containing a copy of this MaterialData

Definition at line 102 of file MaterialData.java.

102  {
103  return new ItemStack(type, amount, data);
104  }

The documentation for this class was generated from the following file: