Package org.bukkit.material
Class TexturedMaterial
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.TexturedMaterial
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
MonsterEggs,SmoothBrick,Step
public abstract class TexturedMaterial extends MaterialData
Represents textured materials like steps and smooth bricks
-
Constructor Summary
Constructors Constructor Description TexturedMaterial(int type)Deprecated.Magic valueTexturedMaterial(int type, byte data)Deprecated.Magic valueTexturedMaterial(Material m)TexturedMaterial(Material type, byte data)Deprecated.Magic value -
Method Summary
Modifier and Type Method Description TexturedMaterialclone()MaterialgetMaterial()Gets the current Material this block is made ofprotected intgetTextureIndex()Deprecated.Magic valueabstract java.util.List<Material>getTextures()Retrieve a list of possible textures.voidsetMaterial(Material material)Sets the material this block is made ofprotected voidsetTextureIndex(int idx)Deprecated.Magic valuejava.lang.StringtoString()Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
Constructor Details
-
TexturedMaterial
-
TexturedMaterial
@Deprecated public TexturedMaterial(int type)Deprecated.Magic value- Parameters:
type- the raw type id
-
TexturedMaterial
@Deprecated public TexturedMaterial(int type, byte data)Deprecated.Magic value- Parameters:
type- the raw type iddata- the raw data value
-
TexturedMaterial
Deprecated.Magic value- Parameters:
type- the typedata- the raw data value
-
-
Method Details
-
getTextures
Retrieve a list of possible textures. The first element of the list will be used as a default.- Returns:
- a list of possible textures for this block
-
getMaterial
Gets the current Material this block is made of- Returns:
- Material of this block
-
setMaterial
Sets the material this block is made of- Parameters:
material- New material of this block
-
getTextureIndex
@Deprecated protected int getTextureIndex()Deprecated.Magic valueGet material index from data- Returns:
- index of data in textures list
-
setTextureIndex
@Deprecated protected void setTextureIndex(int idx)Deprecated.Magic valueSet material index- Parameters:
idx- - index of data in textures list
-
toString
public java.lang.String toString()- Overrides:
toStringin classMaterialData
-
clone
- Overrides:
clonein classMaterialData
-