From 67ba0e95660d02da1076508689a024b4c378e9d8 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 8 Oct 2023 19:03:14 +1000 Subject: [PATCH] Fix typos of entity --- .../viaversion/api/data/entity/EntityTracker.java | 4 ++-- .../viaversion/api/rewriter/EntityRewriter.java | 2 +- .../protocols/protocol1_9to1_8/ItemRewriter.java | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/src/main/java/com/viaversion/viaversion/api/data/entity/EntityTracker.java b/api/src/main/java/com/viaversion/viaversion/api/data/entity/EntityTracker.java index d77711429..2ce01af04 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/data/entity/EntityTracker.java +++ b/api/src/main/java/com/viaversion/viaversion/api/data/entity/EntityTracker.java @@ -87,7 +87,7 @@ public interface EntityTracker { * * @param id entity id * @return stored entity data if an entity with the id is tracked, else null - * @throws IllegalArgumentException if entitiy data storage has not been enabled via the implementation + * @throws IllegalArgumentException if entity data storage has not been enabled via the implementation */ @Nullable StoredEntityData entityData(int id); @@ -96,7 +96,7 @@ public interface EntityTracker { * * @param id entity id * @return stored entity data if it has previously been initialized by {@link #entityData(int)} - * @throws IllegalArgumentException if entitiy data storage has not been enabled via the implementation + * @throws IllegalArgumentException if entity data storage has not been enabled via the implementation */ @Nullable StoredEntityData entityDataIfPresent(int id); diff --git a/api/src/main/java/com/viaversion/viaversion/api/rewriter/EntityRewriter.java b/api/src/main/java/com/viaversion/viaversion/api/rewriter/EntityRewriter.java index 8dd0627ed..1e0d5fba8 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/rewriter/EntityRewriter.java +++ b/api/src/main/java/com/viaversion/viaversion/api/rewriter/EntityRewriter.java @@ -51,7 +51,7 @@ public interface EntityRewriter extends Rewriter { } /** - * Returns the mapped entitiy (or the same if it has not changed). + * Returns the mapped entity (or the same if it has not changed). * * @param id unmapped entity id * @return mapped entity id diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9to1_8/ItemRewriter.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9to1_8/ItemRewriter.java index 48af3c3bf..4dbaec973 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9to1_8/ItemRewriter.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9to1_8/ItemRewriter.java @@ -30,8 +30,8 @@ import java.util.Map; public class ItemRewriter { - public static final Map ENTTIY_NAME_TO_ID = new HashMap<>(); - public static final Map ENTTIY_ID_TO_NAME = new HashMap<>(); + public static final Map ENTITY_NAME_TO_ID = new HashMap<>(); + public static final Map ENTITY_ID_TO_NAME = new HashMap<>(); public static final Map POTION_NAME_TO_ID = new HashMap<>(); public static final Map POTION_ID_TO_NAME = new HashMap<>(); @@ -164,8 +164,8 @@ public class ItemRewriter { CompoundTag entityTag = tag.get("EntityTag"); if (entityTag.get("id") instanceof StringTag) { StringTag id = entityTag.get("id"); - if (ENTTIY_NAME_TO_ID.containsKey(id.getValue())) - data = ENTTIY_NAME_TO_ID.get(id.getValue()); + if (ENTITY_NAME_TO_ID.containsKey(id.getValue())) + data = ENTITY_NAME_TO_ID.get(id.getValue()); } tag.remove("EntityTag"); } @@ -256,7 +256,7 @@ public class ItemRewriter { tag = new CompoundTag(); } CompoundTag entityTag = new CompoundTag(); - String entityName = ENTTIY_ID_TO_NAME.get((int) item.data()); + String entityName = ENTITY_ID_TO_NAME.get((int) item.data()); if (entityName != null) { StringTag id = new StringTag(entityName); entityTag.put("id", id); @@ -417,8 +417,8 @@ public class ItemRewriter { } private static void registerEntity(int id, String name) { - ENTTIY_ID_TO_NAME.put(id, name); - ENTTIY_NAME_TO_ID.put(name, id); + ENTITY_ID_TO_NAME.put(id, name); + ENTITY_NAME_TO_ID.put(name, id); } private static void registerPotion(int id, String name) {