fix issues with spawners and entity parsing

This commit is contained in:
Zoë Gidiere
2023-12-10 18:40:43 -07:00
parent 22c46f2f80
commit fc764a0fb3
3 changed files with 22 additions and 1 deletions
@@ -61,6 +61,13 @@ public class BukkitWorldHandle implements WorldHandle {
@Override
public @NotNull EntityType getEntity(@NotNull String id) {
if (!id.contains(":")) { //TODO: remove in 7.0
String newid = "minecraft:" + id.toLowerCase();;
logger.warn(
"Translating " + id + " to " + newid + ". In 1.20.3 entity parsing was reworked" +
". You are advised to preform this rename in your config backs as this translation will be removed in the next major " +
"version of Terra.");
}
if(!id.startsWith("minecraft:")) throw new IllegalArgumentException("Invalid entity identifier " + id);
String entityID = id.toUpperCase(Locale.ROOT).substring(10);