From fe860372a4b01f003ce5888e8024961f348d7537 Mon Sep 17 00:00:00 2001 From: Alex 'mcmonkey' Goodwin Date: Thu, 22 Aug 2019 04:08:41 -0700 Subject: [PATCH] improve age/plant_growth meta for clarity --- .../denizen/objects/properties/PropertyRegistry.java | 4 +++- .../denizen/objects/properties/item/ItemPlantgrowth.java | 4 ++-- .../denizen/objects/properties/material/MaterialAge.java | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/PropertyRegistry.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/PropertyRegistry.java index 6cf4eb8264..3fb58c1190 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/PropertyRegistry.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/PropertyRegistry.java @@ -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); diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPlantgrowth.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPlantgrowth.java index fa5dfcefaf..3979d1c66e 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPlantgrowth.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPlantgrowth.java @@ -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) { @@ -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 // // diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialAge.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialAge.java index 3f53a3866a..86edff73e1 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialAge.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialAge.java @@ -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)); @@ -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)); @@ -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 // //