From 5833a8432e458625a2a9184be10ac18527587ee9 Mon Sep 17 00:00:00 2001 From: froobynooby Date: Sun, 28 Apr 2024 15:35:30 +0930 Subject: [PATCH] Fix a couple issues with entity categories --- .../java/com/froobworld/farmcontrol/utils/EntityCategory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/froobworld/farmcontrol/utils/EntityCategory.java b/src/main/java/com/froobworld/farmcontrol/utils/EntityCategory.java index 28d08f8..6f21732 100644 --- a/src/main/java/com/froobworld/farmcontrol/utils/EntityCategory.java +++ b/src/main/java/com/froobworld/farmcontrol/utils/EntityCategory.java @@ -63,7 +63,7 @@ public boolean isMember(Class entityClass) { } public boolean isMember(SnapshotEntity entity) { - return isMember(entity.getEntityClass()); + return isMember(entity.getEntityType()); } public boolean isMember(EntityType entityType) { @@ -90,7 +90,7 @@ public boolean isCompatibleWith(Action action) { } public static EntityCategory ofName(String categoryName) { - return EntityCategory.entityCategoryMap.get(categoryName); + return EntityCategory.entityCategoryMap.get(categoryName.toLowerCase()); } }