Skip to content

Commit

Permalink
improve age/plant_growth meta for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 22, 2019
1 parent 8ea2880 commit fe86037
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Expand Up @@ -118,7 +118,9 @@ public static void registermainProperties() {
PropertyParser.registerProperty(ItemNBT.class, ItemTag.class);
PropertyParser.registerProperty(ItemAttributeNBT.class, ItemTag.class);
PropertyParser.registerProperty(ItemPatterns.class, ItemTag.class);
PropertyParser.registerProperty(ItemPlantgrowth.class, ItemTag.class);
if (NMSHandler.getVersion().isAtMost(NMSVersion.v1_12)) {
PropertyParser.registerProperty(ItemPlantgrowth.class, ItemTag.class);
}
PropertyParser.registerProperty(ItemPotion.class, ItemTag.class);
PropertyParser.registerProperty(ItemQuantity.class, ItemTag.class);
PropertyParser.registerProperty(ItemRepairCost.class, ItemTag.class);
Expand Down
Expand Up @@ -70,7 +70,7 @@ public String getAttribute(Attribute attribute) {
// Nether Warts: SEEDED, STAGE_ONE, STAGE_TWO, RIPE
// Cocoa Plants: SMALL, MEDIUM, LARGE
// Pumpkin stem, melon stem, carrot, potato: 0-7
// Deprecated as of MC 1.13, use <@link tag MaterialTag.plant_growth> instead.
// Deprecated as of MC 1.13, use <@link tag MaterialTag.age> instead.
// -->
if (attribute.startsWith("plant_growth")) {
if (item.getItemStack().getData() instanceof Crops) {
Expand Down Expand Up @@ -134,7 +134,7 @@ public void adjust(Mechanism mechanism) {
// @description
// Changes the growth level of plant items.
// See <@link tag ItemTag.plant_growth> for valid inputs.
// Deprecated as of MC 1.13, use <@link mechanism MaterialTag.plant_growth> instead.
// Deprecated as of MC 1.13, use <@link mechanism MaterialTag.age> instead.
// @tags
// <ItemTag.is_crop>
// <ItemTag.plant_growth>
Expand Down
Expand Up @@ -53,7 +53,7 @@ public String getAttribute(Attribute attribute) {
// @returns ElementTag(Number)
// @group properties
// @description
// Returns the maximum age for an ageable material.
// Returns the maximum age for an ageable material. This includes plant growth.
// -->
if (attribute.startsWith("maximum_age") || attribute.startsWith("maximum_plant_growth")) {
return new ElementTag(getMax()).getAttribute(attribute.fulfill(1));
Expand All @@ -65,7 +65,7 @@ public String getAttribute(Attribute attribute) {
// @mechanism MaterialTag.age
// @group properties
// @description
// Returns the current age for an ageable material.
// Returns the current age for an ageable material. This includes plant growth.
// -->
if (attribute.startsWith("age") || attribute.startsWith("plant_growth")) {
return new ElementTag(getCurrent()).getAttribute(attribute.fulfill(1));
Expand Down Expand Up @@ -104,7 +104,7 @@ public void adjust(Mechanism mechanism) {
// @name age
// @input Element(Number)
// @description
// Sets an ageable material's current age.
// Sets an ageable material's current age. This includes plant growth.
// @tags
// <MaterialTag.age>
// <MaterialTag.maximum_age>
Expand Down

0 comments on commit fe86037

Please sign in to comment.