Fixed server crash on trying to play sound with scarpet 'sound' function.

This commit is contained in:
gnembon committed 2019-07-29 15:17:43 -03:00
1 parent 23f141b7fb
commit 5cef894cf7
1 file changed
+1 -1
@@ -2407,7 +2407,7 @@ public class CarpetExpression
CarpetContext cc = (CarpetContext)c;
Identifier soundName = new Identifier(lv.get(0).evalValue(c).getString());
BlockValue.VectorLocator locator = BlockValue.locateVec(cc, lv, 1);
if (!(Registry.SOUND_EVENT.containsId(soundName)))
if (Registry.SOUND_EVENT.get(soundName) == null)
throw new InternalExpressionException("No such sound: "+soundName.getPath());
float volume = 1.0F;
float pitch = 1.0F;