Skip to content

Commit

Permalink
docs(api): add more since tags
Browse files Browse the repository at this point in the history
  • Loading branch information
yusshu committed Dec 17, 2023
1 parent a1fee1d commit 8da13f4
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 2 deletions.
12 changes: 12 additions & 0 deletions api/src/main/java/team/unnamed/creative/model/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
* has "from" and "to" locations, rotation,
* translation and scale
*
* @sinceMinecraft 1.8
* @sincePackFormat 1
* @since 1.0.0
*/
public interface Element extends Examinable {
Expand All @@ -62,6 +64,8 @@ public interface Element extends Examinable {
* element cuboid.
*
* @return The cuboid origin
* @sinceMinecraft 1.8
* @sincePackFormat 1
* @since 1.0.0
*/
@NotNull Vector3Float from();
Expand All @@ -71,6 +75,8 @@ public interface Element extends Examinable {
* cuboid.
*
* @return The cuboid stop point
* @sinceMinecraft 1.8
* @sincePackFormat 1
* @since 1.0.0
*/
@NotNull Vector3Float to();
Expand All @@ -79,6 +85,8 @@ public interface Element extends Examinable {
* Gets the element rotation.
*
* @return The element rotation
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
@NotNull ElementRotation rotation();
Expand All @@ -88,6 +96,8 @@ public interface Element extends Examinable {
* for this element or not
*
* @return True to render shadows
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
boolean shade();
Expand All @@ -99,6 +109,8 @@ public interface Element extends Examinable {
* <p>If a face is left out, it does not render</p>
*
* @return The element faces
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
@Unmodifiable @NotNull Map<CubeFace, ElementFace> faces();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
* Defines the properties of a {@link CubeFace}
* from a {@link Element}
*
* @sinceMinecraft 1.8
* @sincePackFormat 1
* @since 1.0.0
*/
public interface ElementFace extends Examinable {
Expand Down Expand Up @@ -75,6 +77,8 @@ public interface ElementFace extends Examinable {
* generated based on the element's position and face.</p>
*
* @return The texture area to use
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 2.0.0
*/
@Nullable TextureUV uv();
Expand All @@ -84,6 +88,8 @@ public interface ElementFace extends Examinable {
* form prepended with a "#"
*
* @return The face texture
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
@NotNull String texture();
Expand All @@ -95,6 +101,8 @@ public interface ElementFace extends Examinable {
* use the light level from for lighting the face
*
* @return The element cull face
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
@Nullable CubeFace cullFace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
* Class for representing {@link Element}
* rotations in a single axis
*
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
public class ElementRotation implements Examinable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
* <p>Overrides are ignored if it has been already overridden once,
* for example this avoids recursion on overriding to the same model</p>
*
* @sincePackFormat 2
* @sinceMinecraft 1.9
* @since 1.0.0
*/
public class ItemOverride implements Examinable {
Expand Down Expand Up @@ -116,7 +118,7 @@ public int hashCode() {
* Creates a new {@link ItemOverride} instance
* from the given values
*
* @param model The new item model
* @param model The new item model
* @param predicates The item override predicates
* @return A new {@link ItemOverride} instance
* @since 1.0.0
Expand All @@ -132,7 +134,7 @@ public static ItemOverride of(
* Creates a new {@link ItemOverride} instance
* from the given values
*
* @param model The new item model
* @param model The new item model
* @param predicates The item override predicates
* @return A new {@link ItemOverride} instance
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
* Represents an item predicate, used to know
* whether to override an item model or not
*
* @sincePackFormat 2
* @sinceMinecraft 1.9
* @since 1.0.0
*/
public class ItemPredicate implements Examinable {
Expand Down
85 changes: 85 additions & 0 deletions api/src/main/java/team/unnamed/creative/model/ItemTransform.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public interface ItemTransform extends Examinable {
* display
*
* @return The model display rotation
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
@NotNull Vector3Float rotation();
Expand All @@ -62,6 +64,8 @@ public interface ItemTransform extends Examinable {
* and {@code MAX_TRANSLATION}</p>
*
* @return The model display translation
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
@NotNull Vector3Float translation();
Expand All @@ -73,6 +77,8 @@ public interface ItemTransform extends Examinable {
* and {@code MAX_SCALE} constants</p>
*
* @return The model display scale
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
@NotNull Vector3Float scale();
Expand All @@ -83,12 +89,91 @@ public interface ItemTransform extends Examinable {
* @since 1.0.0
*/
enum Type {
/**
* Displayed in the player's right-hand, in
* third person view.
*
* <p>Note that, for Minecraft 1.8.x, this will
* become only {@code THIRDPERSON}. So both {@code THIRDPERSON_RIGHTHAND}
* and {@link #THIRDPERSON_LEFTHAND} will become
* the same display.</p>
*
* @sinceMinecraft 1.9
* @sincePackFormat 2
* @since 1.0.0
*/
THIRDPERSON_RIGHTHAND,

/**
* Displayed in the player's left-hand, in
* third person view.
*
* <p>Note that, for Minecraft 1.8.x, this will
* become only {@code THIRDPERSON}. So both {@link #THIRDPERSON_RIGHTHAND}
* and {@code THIRDPERSON_LEFTHAND} will become
* the same display.</p>
*
* @sinceMinecraft 1.9
* @sincePackFormat 2
* @since 1.0.0
*/
THIRDPERSON_LEFTHAND,

/**
* Displayed in the player's right-hand, in
* first person view.
*
* <p>Note that, for Minecraft 1.8.x, this will
* become only {@code FIRSTPERSON}. So both {@code FIRSTPERSON_RIGHTHAND}
* and {@link #FIRSTPERSON_LEFTHAND} will become
* the same display.</p>
*
* @sinceMinecraft 1.9
* @sincePackFormat 2
* @since 1.0.0
*/
FIRSTPERSON_RIGHTHAND,

/**
* Displayed in the player's left-hand, in
* first person view.
*
* <p>Note that, for Minecraft 1.8.x, this will
* become only {@code FIRSTPERSON}. So both {@link #FIRSTPERSON_RIGHTHAND}
* and {@code FIRSTPERSON_LEFTHAND} will become
* the same display.</p>
*
* @sinceMinecraft 1.9
* @sincePackFormat 2
* @since 1.0.0
*/
FIRSTPERSON_LEFTHAND,

/**
* Displayed in the inventory.
*
* @sinceMinecraft 1.8
* @sincePackFormat 1
* @since 1.0.0
*/
GUI,

/**
* Displayed in the player's head.
*
* @sinceMinecraft 1.9
* @sincePackFormat 2
* @since 1.0.0
*/
HEAD,

/**
* Displayed in the ground.
*
* @sinceMinecraft 1.9
* @sincePackFormat 2
* @since 1.0.0
*/
GROUND,
FIXED
}
Expand Down
12 changes: 12 additions & 0 deletions api/src/main/java/team/unnamed/creative/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public interface Model extends ResourcePackPart, Keyed, Examinable {
* model object
*
* @return The parent model location
* @sinceMinecraft 1.8
* @sincePackFormat 1
* @since 1.0.0
*/
@Nullable Key parent();
Expand All @@ -98,6 +100,8 @@ public interface Model extends ResourcePackPart, Keyed, Examinable {
* default to {@code true}</p>
*
* @return True to use ambient occlusion
* @sinceMinecraft 1.8
* @sincePackFormat 1
* @since 2.0.0
*/
@NotNull TriState ambientOcclusion();
Expand All @@ -107,6 +111,8 @@ public interface Model extends ResourcePackPart, Keyed, Examinable {
* where the model can be displayed
*
* @return An unmodifiable map of displays
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
@NotNull @Unmodifiable Map<ItemTransform.Type, ItemTransform> display();
Expand All @@ -115,6 +121,8 @@ public interface Model extends ResourcePackPart, Keyed, Examinable {
* Returns this model textures
*
* @return This model textures
* @sincePackFormat 1
* @sinceMinecraft 1.8
* @since 1.0.0
*/
@NotNull ModelTextures textures();
Expand All @@ -140,6 +148,8 @@ public interface Model extends ResourcePackPart, Keyed, Examinable {
* forms
*
* @return The model elements
* @sinceMinecraft 1.8
* @sincePackFormat 1
* @since 1.0.0
*/
@NotNull @Unmodifiable List<Element> elements();
Expand All @@ -154,6 +164,8 @@ public interface Model extends ResourcePackPart, Keyed, Examinable {
* on overriding to the same model</p>
*
* @return This item model overrides
* @sinceMinecraft 1.9
* @sincePackFormat 2
* @since 1.0.0
*/
@NotNull List<ItemOverride> overrides();
Expand Down

0 comments on commit 8da13f4

Please sign in to comment.