Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
CreatureChat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Public
CreatureChat
Commits
5cf3c139
Commit
5cf3c139
authored
Jul 16, 2024
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added village, iron golem, and snow golem to whitelist / blacklist auto-complete
parent
06d4265c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
CreatureChatCommands.java
...ain/java/com/owlmaddie/commands/CreatureChatCommands.java
+7
-1
No files found.
src/main/java/com/owlmaddie/commands/CreatureChatCommands.java
View file @
5cf3c139
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment