Expand Structure Block API

By: Senmori <thesenmori@gmail.com>
This commit is contained in:
Bukkit/Spigot
2018-02-12 10:29:34 +11:00
parent 0a870c9752
commit 87a9de3ab8
4 changed files with 312 additions and 2 deletions
@@ -0,0 +1,27 @@
package org.bukkit.block.structure;
/**
* Represents how a {@link org.bukkit.block.Structure} can be mirrored upon
* being loaded.
*/
public enum Mirror {
/**
* No mirroring.
* <br>
* Positive X to Positive Z
*/
NONE,
/**
* Structure is mirrored left to right.
* <br>
* Similar to looking in a mirror. Positive X to Negative Z
*/
LEFT_RIGHT,
/**
* Structure is mirrored front to back.
* <br>
* Positive Z to Negative X
*/
FRONT_BACK;
}
@@ -0,0 +1,26 @@
package org.bukkit.block.structure;
/**
* Represents how a {@link org.bukkit.block.Structure} can be rotated.
*/
public enum StructureRotation {
/**
* No rotation.
*/
NONE,
/**
* Rotated clockwise 90 degrees.
*/
CLOCKWISE_90,
/**
* Rotated clockwise 180 degrees.
*/
CLOCKWISE_180,
/**
* Rotated counter clockwise 90 degrees.
* <br>
* Equivalent to rotating clockwise 270 degrees.
*/
COUNTERCLOCKWISE_90;
}
@@ -0,0 +1,29 @@
package org.bukkit.block.structure;
/**
* Represents how a {@link org.bukkit.block.Structure} can be used.
*/
public enum UsageMode {
/**
* The mode used when saving a structure.
*/
SAVE,
/**
* The mode used when loading a structure.
*/
LOAD,
/**
* Used when saving a structure for easy size calculation. When using this
* mode, the Structure name MUST match the name in the second Structure
* block that is in {@link UsageMode#SAVE}.
*/
CORNER,
/**
* Used to run specific custom functions, which can only be used for certain
* Structures. The structure block is removed after this function completes.
* The data tags (functions) can be found on the
* <a href="http://minecraft.gamepedia.com/Structure_Block#Data">wiki</a>.
*/
DATA;
}