Class Door

Inheritance Relationships

Base Type

Class Documentation

class Door : public Block

This represents a door in Minecraft. This is included among the core modules because it is used in generateAllDoorsInAABB(), which ends up being a fairly commonly used method across the sample algorithms.

Public Functions

virtual void toSemanticMapJSON(nlohmann::json &json_base)

Adds the JSON representation of this object to the “locations” lists of the base json.

Returns

nlohmann::json The base json.

virtual void toLowLevelMapJSON(nlohmann::json &json_base)

Adds the alternate JSON representation of this object to the “blocks” lists of the base json.

Returns

nlohmann::json The base json.

Door(Pos &pos, bool open = false, bool powered = false, std::string name = "dark_oak_door", std::string facing = "south")

Construct a new Door object.

Parameters
  • pos – The position of the block in the Minecraft world.

  • open – Is the door open.

  • powered – Should the door be powered upon placement.

  • facing – Which direction the door should face.

~Door()

Destroy the Lever object.