Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joserobjr committed May 27, 2019
1 parent b3eed45 commit af06621
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
Click the link above to see the future.

## [1.0.0] - 2019-05-27
[Downloads from maven central.][Download 1.0.0]

[Kotlin Documentation][KDoc 1.0.0]
### Added
- `deepClone` method to all tags
- `require` method to `NbtCompound`
Expand Down Expand Up @@ -36,9 +42,13 @@ Useful for Java users and who couldn't get the sources or javadoc.
- API to read and write to/from NBT files/streams using `NbtIO`
- API to freely manipulate NBT data loaded in memory

[Unreleased]: https://github.com/GameModsBR/NBT-Manipulator/compare/v0.0.2...HEAD
[Unreleased]: https://github.com/GameModsBR/NBT-Manipulator/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/GameModsBR/NBT-Manipulator/compare/v0.0.2..v1.0.0
[0.0.2]: https://github.com/GameModsBR/NBT-Manipulator/compare/v0.0.1..v0.0.2
[0.0.1]: https://github.com/GameModsBR/NBT-Manipulator/compare/v0.0.0..v0.0.1

[Download 1.0.0]: http://central.maven.org/maven2/br/com/gamemods/nbt-manipulator/1.0.0/
[Download 0.0.2]: http://central.maven.org/maven2/br/com/gamemods/nbt-manipulator/0.0.2/
[Download 0.0.1]: http://central.maven.org/maven2/br/com/gamemods/nbt-manipulator/0.0.1/

[KDoc 1.0.0]: https://github.com/GameModsBR/NBT-Manipulator/blob/0ef42323681f9960cb2c9698d7b8b1d02632691b/kdoc/br.com.gamemods.nbtmanipulator/index.md
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repositories {
}
dependencies {
compile 'br.com.gamemods:nbt-manipulator:0.0.2'
compile 'br.com.gamemods:nbt-manipulator:1.0.0'
}
```

Expand All @@ -31,15 +31,15 @@ dependencies {
<dependency>
<groupId>br.com.gamemods</groupId>
<artifactId>nbt-manipulator</artifactId>
<version>0.0.2</version>
<version>1.0.0</version>
</dependency>
</dependencies>
```

### Ivy

```xml
<dependency org="br.com.gamemods" name="nbt-manipulator" rev="0.0.2"/>
<dependency org="br.com.gamemods" name="nbt-manipulator" rev="1.0.0"/>
```

### Direct JAR
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group 'br.com.gamemods'
version '0.1.0-SNAPSHOT'
version '1.0.0'

sourceSets.main.java.srcDirs = ["src/main/kotlin"]
sourceSets.test.java.srcDirs = ["src/main/kotlin"]
Expand Down
14 changes: 9 additions & 5 deletions src/main/kotlin/br/com/gamemods/nbtmanipulator/nbt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,16 @@ data class NbtString(var value: String): NbtTag() {
/**
* A tag which contains a [MutableList] structure of [NbtTag]s. All items in the list must have the same class.
* Null values in the list are not allowed.
* @param tags The tags that will be in this list initially. May be read-only.
* The tags in the list will be linked so any modification will also change this tag contents.
* @param T The type of the tag that will be wrapped. [NbtEnd] and [NbtTag] are not valid.
*/
@Suppress("UNCHECKED_CAST")
class NbtList<T: NbtTag>(tags: Collection<T>): NbtTag(), MutableList<T> by tags.toMutableList() {
class NbtList<T: NbtTag>
/**
* Uses all tags as initial value of this list. Make sure to use the same class in all values.
*/
constructor(tags: Collection<T>): NbtTag(), MutableList<T>
by tags.toMutableList() {
/**
* Creates a empty list.
*/
Expand Down Expand Up @@ -223,9 +227,6 @@ private const val BYTE_TRUE: Byte = 1
*
* It's the main heart of NBT files and usually contains complex structures.
*
* @param value A [Map] which contains all key-value mappings.
* The tags in the map will be linked so any modification will also change this tag contents.
*
* The returned tags by this class will be linked, so modifications to it will also affects the compound value.
*
* All get functions which are not prefixed with `Nullable` and `get` will throw a [ClassCastException]
Expand All @@ -237,6 +238,9 @@ private const val BYTE_TRUE: Byte = 1
*
* All get list functions which returns lists of specific types will throw [IllegalStateException] if the list content
* does not match the requested type.
*
* @param value A [Map] which contains all key-value mappings.
* The tags in the map will be linked so any modification will also change this tag contents.
*/
class NbtCompound(value: Map<String, NbtTag>) : NbtTag(), MutableMap<String, NbtTag> by LinkedHashMap(value) {
/**
Expand Down

0 comments on commit af06621

Please sign in to comment.