Add support for removing one element from a list
Fusezion opened this issue ยท 0 comments
Currently under the NBTList#remove
method you're using
while((id = this.indexOf(o)) != -1) {
this.remove(id);
}
While this can normally be fine this sucks when you're removing a string from a string list tag where duplicates are likely to be more apparent causing issues where the tag is just completely empty when you only wanted to removed one element.
I wouldn't call this a bug but should likely be treated as one when the javadocs explicitly state that it "Removes the first occurrence of the specified element from this list" (Copied form List interface)