Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 126f55a

Browse files
committed
Revert code breaking change when using Kotlin and NBTList
1 parent 7b96f30 commit 126f55a

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ java {
1010
}
1111

1212
group 'org.jglrxavpok.nbt'
13-
version '1.1.6'
13+
version '1.1.7'
1414

1515
repositories {
1616
mavenCentral()

src/main/kotlin/org/jglrxavpok/hephaistos/nbt/NBTList.kt

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ class NBTList<Tag: NBT>(val subtagType: Int): Iterable<Tag>, NBT {
6868
add(tag)
6969
}
7070

71-
operator fun plusAssign(tags: Iterable<Tag>) {
72-
add(tags)
73-
}
74-
7571
/**
7672
* Appends a tag of the end of this list
7773
*/
@@ -81,11 +77,6 @@ class NBTList<Tag: NBT>(val subtagType: Int): Iterable<Tag>, NBT {
8177
tags += tag
8278
}
8379

84-
/**
85-
* Appends a list of tags to the end of this list
86-
*/
87-
fun add(tags: Iterable<Tag>): Unit = tags.forEach(::add)
88-
8980
/**
9081
* Casts this list to another list type. Can throw a ClassCastException, so be careful
9182
*/
@@ -130,9 +121,9 @@ class NBTList<Tag: NBT>(val subtagType: Int): Iterable<Tag>, NBT {
130121
}
131122

132123
override fun deepClone() = NBTList<Tag>(subtagType).let {
133-
it += tags.map { element ->
124+
tags.map { element ->
134125
element.deepClone() as Tag
135-
}
126+
}.forEach(it::add)
136127
it
137128
}
138129
}

0 commit comments

Comments
 (0)