Skip to content

Commit

Permalink
Small clarifications/grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
SoSeDiK committed Jun 16, 2024
1 parent 39801ad commit e6f33a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion wiki/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ You might also want to check out some [plugins that use NBT-API](https://github.

Import the API using [Maven](https://github.com/tr7zw/Item-NBT-API/wiki/Using-Maven) or [Gradle](https://github.com/tr7zw/Item-NBT-API/wiki/Using-Gradle), then see the [basic usage](https://github.com/tr7zw/Item-NBT-API/wiki/Using-the-NBT-API) or code examples like [working with Skulls](https://github.com/tr7zw/Item-NBT-API/wiki/Set-a-skull's-skin-using-NBT-API) to familiarize yourself with the API.

Full JavaDoc can be found [here](https://tr7zw.github.io/Item-NBT-API/v2-api/)!
Full Javadoc can be found [here](https://tr7zw.github.io/Item-NBT-API/v2-api/)!
14 changes: 7 additions & 7 deletions wiki/Using-the-NBT-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Basics overview

Most of the things are exposed inside the [NBT](https://tr7zw.github.io/Item-NBT-API/v2-api/de/tr7zw/changeme/nbtapi/NBT.html) class.
Most of the things are exposed inside the [NBT](https://tr7zw.github.io/Item-NBT-API/v2-api/de/tr7zw/changeme/nbtapi/NBT.html) class. Make sure to explore the Javadoc, or ask your IDE for suggestions!

#### Basic getting and setting of data

Expand Down Expand Up @@ -88,7 +88,7 @@ nbt.resolveOrCreateCompound("foo.bar.baz").setInteger("test", 42);
// Example of a key with a . in it. Sets the key foo/some.key/baz/other to 123
nbt.resolveOrCreateCompound("foo.some\\.key.baz").setInteger("other", 123);

// Similarly, you may also fetch values from nested compounds/subtags
// Similarly, you may also fetch values from nested compounds
String s = nbt.resolveOrDefault("foo.bar.Stringtest", "fallback_value");
Integer i = nbt.resolveOrNull("foo\\.bar.baz.Inttest", Integer.class);
```
Expand Down Expand Up @@ -165,7 +165,7 @@ NBT.modify(itemStack, nbt -> {
});
```

###### Changing vanilla nbt on 1.20.5+
###### Changing vanilla item nbt on 1.20.5+

> [!IMPORTANT]
> Since Minecraft 1.20.5 ItemStacks no longer have vanilla nbt during runtime.
Expand Down Expand Up @@ -234,7 +234,7 @@ NBT.modify(zombie, nbt -> {

### Working with blocks

You can store data in tile entities (block entities like chest, furnace, etc.) using the examples from section above, but normal blocks do not have the nbt data.
You can store data in tile entities (block entities like chest, furnace, etc.) using the examples from the section above, but normal blocks do not have the nbt data.

Thus, you have to use your own block data storage to store custom block data.

Expand All @@ -253,7 +253,7 @@ ReadWriteNBT nbt = new NBTBlock(block).getData();

**However**, keep in mind that this data is linked only to the location, and if the block gets broken/changed/exploded/moved/etc., the data will still be on that location unless manually cleared/moved!

Moreover, since the data is stored inside Chunk, this will increase the chunk's size on the disk.
Moreover, since the data is stored inside a Chunk, this will increase the chunk's size on the disk.

## Extras

Expand Down Expand Up @@ -360,7 +360,7 @@ interface TestInterface extends NBTProxy {

Getters are also allowed to return other interfaces extending ``NBTProxy``.

And by using ``@NBTTarget`` annotation you may have a more gradual control over data. It allows to set the type of the method (``has``/``get``/``set``) and the data key.
And by using ``@NBTTarget`` annotation you may have a more gradual control over data. It allows setting the type of the method (``has``/``get``/``set``) and the data key.

```java
interface TestInterface extends NBTProxy {
Expand Down Expand Up @@ -420,4 +420,4 @@ By using the following code:
DataFixerUtil.fixUpItemData(nbt, DataFixerUtil.VERSION1_12_2, DataFixerUtil.VERSION1_20_6);
```

You can also use `DataFixerUtil.getCurrentVersion()` to update the data to whatever version the server s running.
You can also use ``DataFixerUtil.getCurrentVersion()`` to update the data to whatever version the server is running.

0 comments on commit e6f33a3

Please sign in to comment.