Skip to content
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

Conversation

BreadcrumbIsTaken
Copy link
Contributor

Added examples for AreaContainmentObject tags and BiomeTag 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>.
:)

馃悐馃悐馃悐

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.
@@ -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.
Copy link
Member

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
Copy link
Member

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)

@@ -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[, ]"
Copy link
Member

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.
Copy link
Member

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>]:
Copy link
Member

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]>
Copy link
Member

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>
Copy link
Member

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'.
Copy link
Member

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>
Copy link
Member

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]>
Copy link
Member

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

@mcmonkey4eva mcmonkey4eva merged commit 475612b into DenizenScript:dev Nov 25, 2022
@BreadcrumbIsTaken BreadcrumbIsTaken deleted the area_containment_and_biome_examples branch March 7, 2023 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants