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
1
Merge Requests
1
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
b6047d5a
Commit
b6047d5a
authored
Apr 03, 2024
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove debug logs
parent
26ef75a1
Pipeline
#11932
passed with stage
in 21 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
15 deletions
+0
-15
ChatDataManager.java
src/main/java/com/owlmaddie/ChatDataManager.java
+0
-8
EntityBehaviorManager.java
src/main/java/com/owlmaddie/goals/EntityBehaviorManager.java
+0
-6
FollowPlayerGoal.java
src/main/java/com/owlmaddie/goals/FollowPlayerGoal.java
+0
-1
No files found.
src/main/java/com/owlmaddie/ChatDataManager.java
View file @
b6047d5a
...
...
@@ -215,15 +215,7 @@ public class ChatDataManager {
", Argument: "
+
behavior
.
getArgument
()
:
""
));
// Apply behaviors to entity
LOGGER
.
info
(
"About to check behavior name - 1"
);
if
(
behavior
.
getName
().
equals
(
"FOLLOW"
))
{
LOGGER
.
info
(
"FOLLOW behavior detected - 2"
);
if
(
entity
!=
null
)
{
LOGGER
.
info
(
"Entity is not null - 3"
);
}
if
(
player
!=
null
)
{
LOGGER
.
info
(
"Player is not null - 4"
);
}
EntityBehaviorManager
.
addFollowPlayerGoal
(
player
,
entity
,
1.0
);
}
else
if
(
behavior
.
getName
().
equals
(
"UNFOLLOW"
))
{
EntityBehaviorManager
.
removeFollowPlayerGoal
(
entity
);
...
...
src/main/java/com/owlmaddie/goals/EntityBehaviorManager.java
View file @
b6047d5a
...
...
@@ -21,22 +21,16 @@ public class EntityBehaviorManager {
private
static
final
Map
<
UUID
,
FollowPlayerGoal
>
followGoals
=
new
HashMap
<>();
public
static
void
addFollowPlayerGoal
(
ServerPlayerEntity
player
,
MobEntity
entity
,
double
speed
)
{
LOGGER
.
info
(
"Start of addFollowPlayerGoal function - 5"
);
if
(!(
entity
.
getWorld
()
instanceof
ServerWorld
))
{
LOGGER
.
debug
(
"Attempted to add FollowPlayerGoal in a non-server world. Aborting."
);
return
;
}
UUID
entityId
=
entity
.
getUuid
();
LOGGER
.
info
(
"entity.getUuid(): "
+
entity
.
getUuid
()
+
" - 6"
);
if
(!
followGoals
.
containsKey
(
entityId
))
{
LOGGER
.
info
(
"followGoals does not contain the key yet - 7"
);
FollowPlayerGoal
goal
=
new
FollowPlayerGoal
(
player
,
entity
,
speed
);
LOGGER
.
info
(
"Created FollowPlayerGoal instance - 8"
);
GoalSelector
goalSelector
=
GoalUtils
.
getGoalSelector
(
entity
);
LOGGER
.
info
(
"Created goalSelector instance - 9"
);
goalSelector
.
add
(
1
,
goal
);
LOGGER
.
info
(
"Added goal to goalSelector - 10"
);
followGoals
.
put
(
entityId
,
goal
);
LOGGER
.
info
(
"FollowPlayerGoal added for entity UUID: {} with speed: {}"
,
entityId
,
speed
);
}
else
{
...
...
src/main/java/com/owlmaddie/goals/FollowPlayerGoal.java
View file @
b6047d5a
...
...
@@ -30,7 +30,6 @@ public class FollowPlayerGoal extends Goal {
@Override
public
boolean
canStart
()
{
boolean
canStart
=
this
.
targetPlayer
!=
null
;
LOGGER
.
info
(
"[FollowPlayerGoal] canStart: "
+
canStart
);
return
canStart
;
}
...
...
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