Fixed server crash on trying to play sound with scarpet 'sound' function.
This commit is contained in:
1 parent
23f141b7fb
commit
5cef894cf7
1 file changed
+1
-1
@@ -2407,7 +2407,7 @@ public class CarpetExpression
|
|||||||
CarpetContext cc = (CarpetContext)c;
|
CarpetContext cc = (CarpetContext)c;
|
||||||
Identifier soundName = new Identifier(lv.get(0).evalValue(c).getString());
|
Identifier soundName = new Identifier(lv.get(0).evalValue(c).getString());
|
||||||
BlockValue.VectorLocator locator = BlockValue.locateVec(cc, lv, 1);
|
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());
|
throw new InternalExpressionException("No such sound: "+soundName.getPath());
|
||||||
float volume = 1.0F;
|
float volume = 1.0F;
|
||||||
float pitch = 1.0F;
|
float pitch = 1.0F;
|
||||||
|
|||||||
Reference in new issue
Block a user