Skip to content

Commit

Permalink
Check if sound is null before trying to get the name
Browse files Browse the repository at this point in the history
Signed-off-by: djpadbit <[email protected]>
  • Loading branch information
djpadbit committed Jul 30, 2019
1 parent ce62c61 commit 82031bf
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ public static SoundBuffer onLoadSound(SoundBuffer buff, String filename) {
* CALLED BY ASM INJECTED CODE!
*/
public static double calculateEntitySoundOffset(final Entity entity, final SoundEvent sound) {
if (sound == null) return entity.getEyeHeight();
if (stepPattern.matcher(sound.soundName.getPath()).matches()) {
return 0;
}
Expand Down

0 comments on commit 82031bf

Please sign in to comment.