Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 00:00:28 +01:00
Fixed double break sound
Dieser Commit ist enthalten in:
Ursprung
e4346611c9
Commit
afb96c4878
@ -252,11 +252,13 @@ public enum SoundEffect {
|
||||
private String name;
|
||||
private String newname;
|
||||
private SoundCategory cat;
|
||||
private boolean breaksound;
|
||||
|
||||
SoundEffect(String name, String newname, SoundCategory cat) {
|
||||
this.cat = cat;
|
||||
this.newname = newname;
|
||||
this.name = name;
|
||||
this.breaksound = name.startsWith("dig.");
|
||||
}
|
||||
|
||||
public static SoundEffect getByName(String name) {
|
||||
@ -279,5 +281,10 @@ public enum SoundEffect {
|
||||
public SoundCategory getCategory() {
|
||||
return cat;
|
||||
}
|
||||
|
||||
public boolean isBreakPlaceSound()
|
||||
{
|
||||
return breaksound;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -59,6 +59,12 @@ public class OutgoingTransformer {
|
||||
int catid = 0;
|
||||
String newname = name;
|
||||
if (effect != null) {
|
||||
if(effect.isBreakPlaceSound())
|
||||
{
|
||||
input.readBytes(input.readableBytes());
|
||||
output.clear();
|
||||
return;
|
||||
}
|
||||
catid = effect.getCategory().getId();
|
||||
newname = effect.getNewName();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren