Skip to content

Commit

Permalink
Add backward compatibility handleing for GRASS
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Dec 22, 2023
1 parent f6e26aa commit b260cf1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,10 @@ private Object deserialize(Object value, Class<?> clazz) {
return Enums.getIfPresent(EntityType.class, "ZOMBIFIED_PIGLIN")
.or(Enums.getIfPresent(EntityType.class, "PIG_ZOMBIE").or(EntityType.PIG));
}
// Backwards compatibility for upgrade to 1.20.4
if (name.equals("GRASS")) {
return Enums.getIfPresent(EntityType.class, "SHORT_GRASS");
}
value = Enum.valueOf(enumClass, name);
} catch (Exception e) {
// This value does not exist - probably admin typed it wrongly
Expand Down

0 comments on commit b260cf1

Please sign in to comment.