Add backward compatibility handleing for GRASS

This commit is contained in:
tastybento 2023-12-23 08:42:46 +09:00
parent f6e26aa5bd
commit b260cf1f4f

View File

@ -636,6 +636,10 @@ public class YamlDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
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