@@ -509,17 +509,17 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment env, G
509509 }
510510 }
511511 CArray ca = (CArray ) args [args .length - 1 ];
512- if (ca .size () >= 1 ) {
513- line1 = ca .get (0 , t ).val ();
512+ if (ca .size (env ) >= 1 ) {
513+ line1 = ca .get (0 , t , env ).val ();
514514 }
515- if (ca .size () >= 2 ) {
516- line2 = ca .get (1 , t ).val ();
515+ if (ca .size (env ) >= 2 ) {
516+ line2 = ca .get (1 , t , env ).val ();
517517 }
518- if (ca .size () >= 3 ) {
519- line3 = ca .get (2 , t ).val ();
518+ if (ca .size (env ) >= 3 ) {
519+ line3 = ca .get (2 , t , env ).val ();
520520 }
521- if (ca .size () >= 4 ) {
522- line4 = ca .get (3 , t ).val ();
521+ if (ca .size (env ) >= 4 ) {
522+ line4 = ca .get (3 , t , env ).val ();
523523 }
524524
525525 } else {
@@ -813,7 +813,7 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment env, G
813813 throw new CREFormatException ("Invalid sign side: " + args [1 ].val (), t );
814814 }
815815 }
816- text .setGlowingText (ArgumentValidation .getBooleanObject (args [args .length - 1 ], t ));
816+ text .setGlowingText (ArgumentValidation .getBooleanObject (args [args .length - 1 ], t , env ));
817817 sign .update ();
818818 return CVoid .VOID ;
819819 } else {
@@ -928,7 +928,7 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment env, G
928928 throw new CRERangeException ("The block at the specified location is not a sign" , t );
929929 }
930930 MCSign sign = b .getSign ();
931- sign .setWaxed (ArgumentValidation .getBooleanObject (args [1 ], t ));
931+ sign .setWaxed (ArgumentValidation .getBooleanObject (args [1 ], t , env ));
932932 sign .update ();
933933 return CVoid .VOID ;
934934 }
@@ -1210,8 +1210,8 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment env, G
12101210 MCLocation location = ObjectGenerator .GetGenerator ().location (args [0 ], w , t );
12111211 location .getWorld ().setBiome (location , biomeType );
12121212 } else {
1213- x = ArgumentValidation .getInt32 (args [0 ], t );
1214- z = ArgumentValidation .getInt32 (args [1 ], t );
1213+ x = ArgumentValidation .getInt32 (args [0 ], t , env );
1214+ z = ArgumentValidation .getInt32 (args [1 ], t , env );
12151215 if (args .length == 4 ) {
12161216 w = Static .getServer ().getWorld (args [2 ].val ());
12171217 } else if (w == null ) {
@@ -1855,7 +1855,7 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment env, G
18551855 }
18561856
18571857 if (sa .containsKey ("seed" ) && Static .getServer ().getMinecraftVersion ().gte (MCVersion .MC1_20_2 )) {
1858- seed = ArgumentValidation .getInt (sa .get ("seed" , t ), t );
1858+ seed = ArgumentValidation .getInt (sa .get ("seed" , t , env ), t , env );
18591859 }
18601860
18611861 if (args .length == 3 ) {
@@ -2001,7 +2001,7 @@ public Mixed exec(Target t,
20012001
20022002 CArray sa = (CArray ) args [1 ];
20032003
2004- path = ArgumentValidation .getStringObject (sa .get ("sound" , t , env ), t );
2004+ path = ArgumentValidation .getStringObject (sa .get ("sound" , t , env ), t , env );
20052005
20062006 if (sa .containsKey ("category" )) {
20072007 try {
@@ -2020,7 +2020,7 @@ public Mixed exec(Target t,
20202020 }
20212021
20222022 if (Static .getServer ().getMinecraftVersion ().gte (MCVersion .MC1_20_2 ) && sa .containsKey ("seed" )) {
2023- seed = ArgumentValidation .getInt (sa .get ("seed" , t ), t );
2023+ seed = ArgumentValidation .getInt (sa .get ("seed" , t , env ), t , env );
20242024 }
20252025
20262026 if (args .length == 3 ) {
@@ -3070,13 +3070,13 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment env, G
30703070 CArray p = ArgumentValidation .getArray (mp , t , env );
30713071 MCDyeColor color ;
30723072 try {
3073- color = MCDyeColor .valueOf (p .get ("color" , t ).val ());
3073+ color = MCDyeColor .valueOf (p .get ("color" , t , env ).val ());
30743074 } catch (IllegalArgumentException ex ) {
30753075 throw new CREFormatException ("Invalid color name" , t );
30763076 }
30773077 MCPatternShape shape ;
30783078 try {
3079- shape = MCPatternShape .valueOf (p .get ("shape" , t ).val ());
3079+ shape = MCPatternShape .valueOf (p .get ("shape" , t , env ).val ());
30803080 } catch (IllegalArgumentException ex ) {
30813081 throw new CREFormatException ("Invalid shape name" , t );
30823082 }
@@ -3272,10 +3272,10 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment env, G
32723272 MCLocation loc = ObjectGenerator .GetGenerator ().location (args [0 ], null , t );
32733273 MCBlockState bs = loc .getBlock ().getState ();
32743274 if (bs instanceof MCDecoratedPot decoratedPot ) {
3275- CArray sherds = CArray .GetAssociativeArray (t );
3275+ CArray sherds = CArray .GetAssociativeArray (t , null , env );
32763276 Map <MCDecoratedPot .Side , MCMaterial > potSherds = decoratedPot .getSherds ();
32773277 for (Map .Entry <MCDecoratedPot .Side , MCMaterial > side : potSherds .entrySet ()) {
3278- sherds .set (side .getKey ().name ().toLowerCase (), side .getValue ().name ());
3278+ sherds .set (side .getKey ().name ().toLowerCase (), side .getValue ().name (), env );
32793279 }
32803280 return sherds ;
32813281 } else {
@@ -3345,7 +3345,7 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment env, G
33453345 throw new CREFormatException ("Invalid decorated pot side: " + key , t );
33463346 }
33473347 try {
3348- decoratedPot .setSherd (side , MCMaterial .valueOf (sherdArray .get (key , t ).val ()));
3348+ decoratedPot .setSherd (side , MCMaterial .valueOf (sherdArray .get (key , t , env ).val ()));
33493349 } catch (IllegalArgumentException ex ) {
33503350 throw new CREFormatException (ex .getMessage (), t );
33513351 }
0 commit comments