@@ -2232,7 +2232,12 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi
22322232 break ;
22332233 case SHULKER :
22342234 MCShulker shulker = (MCShulker ) entity ;
2235- specArray .set (entity_spec .KEY_SHULKER_COLOR , new CString (shulker .getColor ().name (), t ), t );
2235+ MCDyeColor shulkerColor = shulker .getColor ();
2236+ if (shulkerColor == null ) {
2237+ specArray .set (entity_spec .KEY_SHULKER_COLOR , CNull .NULL , t );
2238+ } else {
2239+ specArray .set (entity_spec .KEY_SHULKER_COLOR , new CString (shulker .getColor ().name (), t ), t );
2240+ }
22362241 break ;
22372242 case SHULKER_BULLET :
22382243 MCShulkerBullet bullet = (MCShulkerBullet ) entity ;
@@ -3668,8 +3673,13 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi
36683673 for (String index : specArray .stringKeySet ()) {
36693674 switch (index .toLowerCase ()) {
36703675 case entity_spec .KEY_SHULKER_COLOR :
3676+ Mixed value = specArray .get (index , t );
3677+ if (value instanceof CNull ) {
3678+ shulker .setColor (null );
3679+ break ;
3680+ }
36713681 try {
3672- shulker .setColor (MCDyeColor .valueOf (specArray . get ( index , t ) .val ().toUpperCase ()));
3682+ shulker .setColor (MCDyeColor .valueOf (value .val ().toUpperCase ()));
36733683 } catch (IllegalArgumentException exception ) {
36743684 throw new CREFormatException ("Invalid shulker color: " + specArray .get (index , t ).val (), t );
36753685 }
0 commit comments