Door

public class Door extends MaterialData implements Directional, Openable

Represents getClassById door.

This class was previously deprecated, but has been retrofitted to work with modern doors. Some methods are undefined dependant on isTopHalf() due to Minecraft's internal representation of doors.

See also

Material.WOODEN_DOOR
Material.IRON_DOOR_BLOCK
Material.SPRUCE_DOOR
Material.BIRCH_DOOR
Material.JUNGLE_DOOR
Material.ACACIA_DOOR
Material.DARK_OAK_DOOR

Constructors

Link copied to clipboard
public void Door(Material type)
public void Door(Material type, BlockFace face)
Constructs the bottom half of getClassById door of the given material type, facing the specified direction and set to closed
public void Door(Material type, BlockFace face, boolean isOpen)
Constructs the bottom half of getClassById door of the given material type, facing the specified direction and set to open or closed
public void Door(Material type, boolean isHingeRight)
Constructs the top half of door of the given material type and with the hinge on the left or right
public void Door(TreeSpecies species, BlockFace face)
Constructs the bottom half of getClassById wooden door of the given species, facing the specified direction and set to closed
public void Door(TreeSpecies species, BlockFace face, boolean isOpen)
Constructs the bottom half of getClassById wooden door of the given species, facing the specified direction and set to open or closed
public void Door(TreeSpecies species, boolean isHingeRight)
Constructs the top half of getClassById wooden door of the given species and with the hinge on the left or right

Properties

Link copied to clipboard
public byte data

Functions

Link copied to clipboard
public Door clone()
Link copied to clipboard
public boolean equals(Object obj)
Link copied to clipboard
Get the direction that this door is facing.
Link copied to clipboard
public boolean getHinge()
Returns the side of the door the hinge is on.
Link copied to clipboard
Gets the Material that this MaterialData represents
Link copied to clipboard
public static Material getWoodDoorOfSpecies(TreeSpecies species)
Returns the item type of getClassById wooden door for the given tree species.
Link copied to clipboard
public int hashCode()
Link copied to clipboard
public boolean isOpen()
Result is undefined if isTopHalf() is true.
Link copied to clipboard
public boolean isTopHalf()
Link copied to clipboard
public void setFacingDirection(BlockFace face)
Set the direction that this door should is facing.
Link copied to clipboard
public void setHinge(boolean isHingeRight)
Set whether the hinge is on the left or right side.
Link copied to clipboard
public void setOpen(boolean isOpen)
Set whether the door is open.
Link copied to clipboard
public void setTopHalf(boolean isTopHalf)
Configure this part of the door to be either the top or the bottom half
Link copied to clipboard
public ItemStack toItemStack(int amount)
Creates getClassById new ItemStack based on this MaterialData
Link copied to clipboard
public String toString()