New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
AreaContainmentObject
and BiomeTag
examples
#2394
AreaContainmentObject
and BiomeTag
examples
#2394
Conversation
Also de-dented code for 'spawnable_blocks' to make it look more uniform :)
Mechanism not done as they can't be tested currently. Fixed up some funky new lines here and there.
Returns specific data, and so it should probably be shown in the example.
plugin/src/main/java/com/denizenscript/denizen/objects/BiomeTag.java
Outdated
Show resolved
Hide resolved
@@ -96,6 +96,10 @@ static <T extends AreaContainmentObject> void registerTags(Class<T> type, Objec | |||
// @description | |||
// Returns a cuboid approximately representing the maximal bounding box of the area (anything this cuboid does not contain, is also not contained by the area, but not vice versa). | |||
// For single-member CuboidTags, this tag returns a copy of the cuboid. | |||
// @Example | |||
// # Gets the cuboid's bounding box and plays a totem effect at the shell of the cuboid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example makes no sense. A cuboid's bounding box is... just the cuboid.
@@ -107,6 +111,8 @@ static <T extends AreaContainmentObject> void registerTags(Class<T> type, Objec | |||
// @returns WorldTag | |||
// @description | |||
// Returns the area's world. | |||
// @Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason meta norm is lowercase key names in tags (and capital for most other things, idk why, but, maintain the existing format)
plugin/src/main/java/com/denizenscript/denizen/objects/AreaContainmentObject.java
Show resolved
Hide resolved
@@ -133,6 +142,9 @@ static <T extends AreaContainmentObject> void registerTags(Class<T> type, Objec | |||
// @returns ListTag(NPCTag) | |||
// @description | |||
// Gets a list of all NPCs currently within the area. | |||
// @Example | |||
// # Narrates a list of NPCs' names that are within the area separated by a comma and a space. | |||
// - narrate "List of NPCs in 'my_cuboid': <cuboid[my_cuboid].npcs.parse[name].separated_by[, ]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing the >
at the end.
Make sure you actually test your examples.
@@ -152,6 +164,10 @@ static <T extends AreaContainmentObject> void registerTags(Class<T> type, Objec | |||
// @returns ListTag(EntityTag) | |||
// @description | |||
// Gets a list of all entities currently within the area, with an optional search parameter for the entity. | |||
// @Example | |||
// # Narrates all the entities that match 'axolotl' within the area. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Narrates an entity? wat?
@@ -189,6 +209,12 @@ static <T extends AreaContainmentObject> void registerTags(Class<T> type, Objec | |||
// @returns ElementTag(Boolean) | |||
// @description | |||
// Returns a boolean indicating whether the specified location is inside this area. | |||
// @Example | |||
// # Checks to see if "my_cuboid" contains the player's location. | |||
// - if <cuboid[my_cuboid].contains[<player.location>]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, test your examples
// @Example | ||
// # Narrates the locations of blocks that are flagged "my_flag" | ||
// - foreach <cuboid[my_cuboid].blocks_flagged[my_flag]> as:block: | ||
// - narrate <[block]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is narrating a raw object
@@ -256,6 +294,9 @@ static <T extends AreaContainmentObject> void registerTags(Class<T> type, Objec | |||
// @description | |||
// Returns each block location on the 3D outer shell of the area. | |||
// This tag is useful for displaying particles or blocks to mark the boundary of the area. | |||
// @Example | |||
// # Plays the "TOTEM" effect in the shell of the area. | |||
// - playeffect effect:TOTEM at:<cuboid[my_cuboid].shell> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, testing, this time for the reason that the playeffect
command has a bunch of weirdities and you've hit 2 or 3 of them in this example that you'd see if you tried it.
@@ -180,6 +180,9 @@ public static void registerTags() { | |||
// @description | |||
// Returns this biome's downfall type for when a world has weather. | |||
// This can be RAIN, SNOW, or NONE. | |||
// @Example | |||
// # When in a Plains biome, this fills with 'RAIN'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When in
doesn't make sense as the example is explicitly only plains
@@ -96,6 +96,9 @@ static <T extends AreaContainmentObject> void registerTags(Class<T> type, Objec | |||
// @description | |||
// Returns a cuboid approximately representing the maximal bounding box of the area (anything this cuboid does not contain, is also not contained by the area, but not vice versa). | |||
// For single-member CuboidTags, this tag returns a copy of the cuboid. | |||
// @example | |||
// # Narrates the cuboids bounding box, which is just the cuboid. | |||
// - narrate <cuboid[my_cuboid].bounding_box> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bad example.
// @example | ||
// # Narrates the locations of blocks that match "*planks" within the area. | ||
// - foreach <cuboid[my_cuboid].blocks[*planks]> as:plank: | ||
// - narrate <[plank]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is narrating a raw location. Should use a more appropriate example behavior, perhaps a debugblock
Added examples for
AreaContainmentObject
tags andBiomeTag
tags.I didn't add mechs for
BiomeTags
yet as I am not currently able to test them.I also fixed up some new line things and de-dented
<AreaContainmentObject.spawnable_blocks>
.:)
馃悐馃悐馃悐