Skip to content

Commit ec40ae3

Browse files
committed
Compatibility with NBS 3.5.0 #33
1 parent 68c7d28 commit ec40ae3

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,5 @@ pip-log.txt
231231

232232
#Mr Developer
233233
.mr.developer.cfg
234+
*.ipr
235+
*.iws

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.xxmicloxx</groupId>
77
<artifactId>NoteBlockAPI</artifactId>
8-
<version>1.4.1</version>
8+
<version>1.4.2</version>
99
<name>NoteBlockAPI</name>
1010

1111
<properties>

src/main/java/com/xxmicloxx/NoteBlockAPI/NBSDecoder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ private static Song parse(InputStream inputStream, File songFile) {
119119

120120
String name = readString(dataInputStream);
121121
byte volume = dataInputStream.readByte();
122+
if (nbsversion >= 2){
123+
dataInputStream.readByte();
124+
}
122125
if (layer != null) {
123126
layer.setName(name);
124127
layer.setVolume(volume);

src/main/java/com/xxmicloxx/NoteBlockAPI/utils/NBSDecoder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ private static Song parse(InputStream inputStream, File songFile) {
122122

123123
String name = readString(dataInputStream);
124124
byte volume = dataInputStream.readByte();
125+
if (nbsversion >= 2){//layerstereo
126+
dataInputStream.readByte();
127+
}
125128
if (layer != null) {
126129
layer.setName(name);
127130
layer.setVolume(volume);

0 commit comments

Comments
 (0)