Browse Source

Fix English errors in CONVENTIONS.md and README.md (#2414)

pull/2420/head
enbrain 5 months ago
committed by GitHub
parent
commit
4fcb4e4ad3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      CONVENTIONS.md
  2. 2
      README.md

12
CONVENTIONS.md

@ -18,7 +18,7 @@ grouping classes together in an IDE's tree view, reading and writing code is don
Use American English for consistency throughout Yarn and with known Mojang names.
If there are two accepted spellings of the same word, first check if one is already being used in Yarn or by Mojang, and if
If there are two acceptable spellings of the same word, first check if one is already being used in Yarn or by Mojang, and if
not, use the most common spelling.
## Conciseness
@ -47,7 +47,7 @@ time to type thanks to IDE autocompletion. Common abbreviations you should use a
- Any abbreviations used by Java or libraries ("json", "html", etc.)
- "o" for the parameter of `equals(Ljava/lang/Object;)Z` methods
Treat acronyms as single words rather than capitalising every letter. This improves readability (compare `JsonObject` and
Treat acronyms as single words rather than capitalizing every letter. This improves readability (compare `JsonObject` and
`JSONObject`) and it's consistent with Mojang naming (a known name is `NbtIo`).
## Packages
@ -117,9 +117,9 @@ Name screen coordinates `x` and `y`, rather than `left` and `top`.
## Javadocs
Write sentences for class, method and fields javadocs, starting with an uppercase and ending with a period. Start method docs with verbs, like `Gets` or `Called`. Use HTML tags such as `<p>` if the docs have several paragraphs, as line wraps are converted to spaces in the generated documentation. Feel free to start a new line whenever you feel the current line is too long.
Write sentences for class, method and field javadocs, starting with an uppercase and ending with a period. Start method docs with verbs, like `Gets` or `Called`. Use HTML tags such as `<p>` if the docs have several paragraphs, as line wraps are converted to spaces in the generated documentation. Feel free to start a new line whenever you feel the current line is too long.
Parameter and `@return` documentation should use quick descriptions without initial capitalization or punctuation, such as `{@code true} if the block placement was successful, {@code false} otherwise`. `{@return}` used in first sentence can duplicate enclosed text to the return description.
Parameter and `@return` documentation should use quick descriptions without initial capitalization or punctuation, such as `{@code true} if the block placement was successful, {@code false} otherwise`. `{@return}` used in the first sentence can duplicate enclosed text to the return description.
Use `{@index}` to allow enclosed text to be indexed by the Javadoc search.
@ -221,10 +221,10 @@ In order to hint that the description references the game's content, inline link
**Do not use names from Mojang's obfuscation maps.**
Use names that match names in strings in the vanilla code, unless that string is outdated or inaccurate. This avoids confusion,
especially from new modders who may not understand what an class exception message is referring to.
especially from new modders who may not understand what a class exception message is referring to.
Even if a known Mojang name doesn't appear in any strings, it's a good idea to use it since the official name is a good
indicator of the the class's actual purpose and makes it less likely the name will have to be changed in the future. For
indicator of the class's actual purpose and makes it less likely the name will have to be changed in the future. For
example, don't name a class that Mojang calls `BedrockBlock` `NoSpawningBlock`, even if its only purpose is to disable mob
spawning, because Mojang may decide to override more methods in that class, breaking mods that were using it in an unexpected
way.

2
README.md

@ -34,7 +34,7 @@ Yarn uses Gradle to provide a number of utility tasks for working with the mappi
### `yarn`
Setup and download and launch the latest version of [Enigma](https://github.com/FabricMC/Enigma) automatically configured to use the merged jar and the mappings.
Compared to launching Enigma externally, the gradle task adds a name guesser plugin that automatically map enums and a few constant field names.
Compared to launching Enigma externally, the gradle task adds a name guesser plugin that automatically maps enums and a few constant field names.
### `yarnUnpicked`
Same as above, but unpicks the constants and launches Enigma with them. Can be a little bit slower to get going.

Loading…
Cancel
Save