mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-13 15:16:50 +01:00
Fix errors in sounds
This commit is contained in:
parent
4b01f98f55
commit
b17191a462
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>LibsDisguises</artifactId>
|
||||
<version>9.0.5</version>
|
||||
<version>9.0.5-SNAPSHOT</version>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
|
@ -186,7 +186,7 @@ public class PacketListenerSounds extends PacketAdapter
|
||||
int typeId = soundLoc.getWorld().getBlockTypeIdAt(soundLoc.getBlockX(),
|
||||
soundLoc.getBlockY() - 1, soundLoc.getBlockZ());
|
||||
|
||||
Object block = ReflectionManager.getNmsMethod("RegistryMaterials", "a", int.class)
|
||||
Object block = ReflectionManager.getNmsMethod("RegistryMaterials", "getId", int.class)
|
||||
.invoke(ReflectionManager.getNmsField("Block", "REGISTRY").get(null), typeId);
|
||||
|
||||
if (block != null)
|
||||
@ -194,7 +194,7 @@ public class PacketListenerSounds extends PacketAdapter
|
||||
Object step = ReflectionManager.getNmsField("Block", "stepSound").get(block);
|
||||
|
||||
mods.write(0,
|
||||
ReflectionManager.getNmsMethod(step.getClass(), "getStepSound").invoke(step));
|
||||
ReflectionManager.getNmsMethod(step.getClass(), "d").invoke(step));
|
||||
mods.write(1, ReflectionManager.getSoundCategory(disguise.getType()));
|
||||
}
|
||||
}
|
||||
@ -237,7 +237,7 @@ public class PacketListenerSounds extends PacketAdapter
|
||||
|
||||
if (((MobDisguise) disguise).isAdult() == baby)
|
||||
{
|
||||
float pitch = (Integer) mods.read(5);
|
||||
float pitch = (Integer) mods.read(6);
|
||||
|
||||
if (baby)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user