@@ -1942,7 +1942,13 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi
19421942 } else {
19431943 tippedmeta .set ("base" , ObjectGenerator .GetGenerator ().potionData (arrow .getBasePotionData (), t ), t );
19441944 }
1945- specArray .set (entity_spec .KEY_TIPPEDARROW_POTIONMETA , tippedmeta , t );
1945+ specArray .set (entity_spec .KEY_ARROW_POTIONMETA , tippedmeta , t );
1946+ MCColor arrowColor = arrow .getColor ();
1947+ if (arrowColor == null ) {
1948+ specArray .set (entity_spec .KEY_ARROW_COLOR , CNull .NULL , t );
1949+ } else {
1950+ specArray .set (entity_spec .KEY_ARROW_COLOR , ObjectGenerator .GetGenerator ().color (arrowColor , t ), t );
1951+ }
19461952 break ;
19471953 case ARMOR_STAND :
19481954 MCArmorStand stand = (MCArmorStand ) entity ;
@@ -2433,6 +2439,8 @@ public MSVersion since() {
24332439 private static final String KEY_ARROW_DAMAGE = "damage" ;
24342440 private static final String KEY_ARROW_PIERCE_LEVEL = "piercelevel" ;
24352441 private static final String KEY_ARROW_PICKUP = "pickup" ;
2442+ private static final String KEY_ARROW_POTIONMETA = "potionmeta" ;
2443+ private static final String KEY_ARROW_COLOR = "color" ;
24362444 private static final String KEY_ARMORSTAND_ARMS = "arms" ;
24372445 private static final String KEY_ARMORSTAND_BASEPLATE = "baseplate" ;
24382446 private static final String KEY_ARMORSTAND_GRAVITY = "gravity" ;
@@ -2542,7 +2550,6 @@ public MSVersion since() {
25422550 private static final String KEY_SPECTRAL_ARROW_GLOWING_TICKS = "glowingticks" ;
25432551 private static final String KEY_SPLASH_POTION_ITEM = "item" ;
25442552 private static final String KEY_STEERABLE_SADDLED = "saddled" ;
2545- private static final String KEY_TIPPEDARROW_POTIONMETA = "potionmeta" ;
25462553 private static final String KEY_TROPICALFISH_COLOR = "color" ;
25472554 private static final String KEY_TROPICALFISH_PATTERN = "pattern" ;
25482555 private static final String KEY_TROPICALFISH_PATTERNCOLOR = "patterncolor" ;
@@ -2747,7 +2754,7 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi
27472754 + specArray .get (index , t ).val (), t );
27482755 }
27492756 break ;
2750- case entity_spec .KEY_TIPPEDARROW_POTIONMETA :
2757+ case entity_spec .KEY_ARROW_POTIONMETA :
27512758 Mixed c = specArray .get (index , t );
27522759 if (c .isInstanceOf (CArray .TYPE )) {
27532760 CArray meta = (CArray ) c ;
@@ -2782,7 +2789,18 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi
27822789 }
27832790 }
27842791 } else {
2785- throw new CRECastException ("TippedArrow potion meta must be an array" , t );
2792+ throw new CRECastException ("Arrow potion meta must be an array" , t );
2793+ }
2794+ break ;
2795+ case entity_spec .KEY_ARROW_COLOR :
2796+ Mixed colorMixed = specArray .get (index , t );
2797+ if (colorMixed instanceof CNull ) {
2798+ arrow .setColor (null );
2799+ } else if (colorMixed .isInstanceOf (CArray .TYPE )) {
2800+ CArray color = (CArray ) colorMixed ;
2801+ arrow .setColor (ObjectGenerator .GetGenerator ().color (color , t ));
2802+ } else {
2803+ throw new CRECastException ("Arrow color must be an array" , t );
27862804 }
27872805 break ;
27882806 default :
0 commit comments