public class Door extends MaterialData implements Directional, Openable
isTopHalf()
due to Minecraft's internal representation of doors.Constructor and Description |
---|
Door()
Deprecated.
Artifact of old API, equivalent to new
Door(Material.WOODEN_DOOR); |
Door(int type)
Deprecated.
Magic value
|
Door(int type,
byte data)
Deprecated.
Magic value
|
Door(Material type) |
Door(Material type,
byte data)
Deprecated.
Magic value
|
Modifier and Type | Method and Description |
---|---|
Door |
clone() |
BlockFace |
getFacing()
Get the direction that this door is facing.
|
boolean |
getHinge()
Returns the side of the door the hinge is on.
|
BlockFace |
getHingeCorner()
Deprecated.
This method should not be used; use hinge and facing accessors instead.
|
boolean |
isOpen()
Result is undefined if
isTopHalf() is true. |
boolean |
isTopHalf() |
void |
setFacingDirection(BlockFace face)
Set the direction that this door should is facing.
|
void |
setHinge(boolean hinge)
Set whether the hinge is on the left or right side.
|
void |
setOpen(boolean isOpen)
Set whether the door is open.
|
void |
setTopHalf(boolean isTopHalf)
Configure this part of the door to be either the top or the bottom half
|
String |
toString() |
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
@Deprecated public Door()
Door(Material.WOODEN_DOOR);
@Deprecated public Door(int type)
type
- the raw type idpublic Door(Material type)
@Deprecated public Door(int type, byte data)
type
- the raw type iddata
- the raw data value@Deprecated public Door(Material type, byte data)
type
- the typedata
- the raw data valuepublic boolean isOpen()
isTopHalf()
is true.public void setOpen(boolean isOpen)
isTopHalf()
is true.public boolean isTopHalf()
public void setTopHalf(boolean isTopHalf)
isTopHalf
- True to make it the top half.@Deprecated public BlockFace getHingeCorner()
public String toString()
toString
in class MaterialData
public void setFacingDirection(BlockFace face)
isTopHalf()
is true.setFacingDirection
in interface Directional
face
- the directionpublic BlockFace getFacing()
isTopHalf()
is true.getFacing
in interface Directional
public boolean getHinge()
isTopHalf()
is false.public void setHinge(boolean hinge)
isTopHalf()
is false.public Door clone()
clone
in class MaterialData
Copyright © 2015. All rights reserved.