Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2025-01-11 23:51:00 +01:00
18w08a sound rewrite
Dieser Commit ist enthalten in:
Ursprung
8848758578
Commit
4de081efda
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w07c</version>
|
||||
<version>1.4.0-18w08a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w07c</version>
|
||||
<version>1.4.0-18w08a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w07c</version>
|
||||
<version>1.4.0-18w08a</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -62,7 +62,7 @@ public class ProtocolVersion {
|
||||
register(v1_12 = new ProtocolVersion(335, "1.12"));
|
||||
register(v1_12_1 = new ProtocolVersion(338, "1.12.1"));
|
||||
register(v1_12_2 = new ProtocolVersion(340, "1.12.2"));
|
||||
register(v1_13 = new ProtocolVersion(360, "18w07c"));
|
||||
register(v1_13 = new ProtocolVersion(361, "18w08a"));
|
||||
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
||||
}
|
||||
|
||||
|
@ -299,10 +299,7 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
int soundId = wrapper.get(Type.VAR_INT, 0);
|
||||
|
||||
// Handle new 'Pumpkin Carve' sound
|
||||
if (soundId >= 86)
|
||||
wrapper.set(Type.VAR_INT, 0, soundId + 1);
|
||||
wrapper.set(Type.VAR_INT, 0, getNewSoundID(soundId));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -377,8 +374,6 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: Sound effect
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -395,4 +390,25 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
||||
providers.register(BlockEntityProvider.class, new BlockEntityProvider());
|
||||
providers.register(PaintingProvider.class, new PaintingProvider());
|
||||
}
|
||||
|
||||
private int getNewSoundID(final int oldID){
|
||||
int newID = oldID;
|
||||
if (oldID >= 10)
|
||||
newID += 5;
|
||||
if (oldID >= 86)
|
||||
newID++;
|
||||
if (oldID >= 352)
|
||||
newID += 5;
|
||||
if (oldID >= 438)
|
||||
newID++;
|
||||
if (oldID >= 443)
|
||||
newID += 12;
|
||||
if (oldID >= 485)
|
||||
newID++;
|
||||
if (oldID >= 508)
|
||||
newID += 2;
|
||||
if (oldID >= 524)
|
||||
newID += 8;
|
||||
return newID;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w07c</version>
|
||||
<version>1.4.0-18w08a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>viaversion-jar</name>
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>us.myles</groupId>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<version>1.4.0-18w07c</version>
|
||||
<version>1.4.0-18w08a</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>viaversion-parent</name>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w07c</version>
|
||||
<version>1.4.0-18w08a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w07c</version>
|
||||
<version>1.4.0-18w08a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren