Commit 5cf3c139 by Jonathan Thomas

Added village, iron golem, and snow golem to whitelist / blacklist auto-complete

parent 06d4265c
...@@ -77,12 +77,18 @@ public class CreatureChatCommands { ...@@ -77,12 +77,18 @@ public class CreatureChatCommands {
List<Identifier> livingEntityIds = Registries.ENTITY_TYPE.getIds().stream() List<Identifier> livingEntityIds = Registries.ENTITY_TYPE.getIds().stream()
.filter(id -> { .filter(id -> {
EntityType<?> entityType = Registries.ENTITY_TYPE.get(id); EntityType<?> entityType = Registries.ENTITY_TYPE.get(id);
return entityType != null && entityType.getSpawnGroup() != SpawnGroup.MISC; return entityType != null && (entityType.getSpawnGroup() != SpawnGroup.MISC || isIncludedEntity(entityType));
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
return livingEntityIds; return livingEntityIds;
} }
private static boolean isIncludedEntity(EntityType<?> entityType) {
return entityType == EntityType.VILLAGER
|| entityType == EntityType.IRON_GOLEM
|| entityType == EntityType.SNOW_GOLEM;
}
private static List<String> getLivingEntityTypeNames() { private static List<String> getLivingEntityTypeNames() {
return getLivingEntityIds().stream() return getLivingEntityIds().stream()
.map(Identifier::toString) .map(Identifier::toString)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment