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
3cbbf26c
Commit
3cbbf26c
authored
Aug 05, 2024
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing FuzzyTargeting on LEAD behavior to move towards the general random point
parent
06514055
Pipeline
#12711
passed with stages
in 1 minute 56 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
LeadPlayerGoal.java
src/main/java/com/owlmaddie/goals/LeadPlayerGoal.java
+0
-1
RandomTargetFinder.java
src/main/java/com/owlmaddie/utils/RandomTargetFinder.java
+2
-2
No files found.
src/main/java/com/owlmaddie/goals/LeadPlayerGoal.java
View file @
3cbbf26c
...
...
@@ -97,7 +97,6 @@ public class LeadPlayerGoal extends PlayerBaseGoal {
Path
path
=
this
.
entity
.
getNavigation
().
findPathTo
(
this
.
currentTarget
.
x
,
this
.
currentTarget
.
y
,
this
.
currentTarget
.
z
,
1
);
if
(
path
!=
null
)
{
LOGGER
.
info
(
"Start moving towards waypoint PATH"
);
this
.
entity
.
getNavigation
().
startMovingAlong
(
path
,
this
.
speed
);
}
else
{
...
...
src/main/java/com/owlmaddie/utils/RandomTargetFinder.java
View file @
3cbbf26c
...
...
@@ -24,10 +24,10 @@ public class RandomTargetFinder {
Vec3d
target
=
getTargetInDirection
(
entity
,
constrainedDirection
,
minDistance
,
maxDistance
);
if
(
entity
instanceof
PathAwareEntity
)
{
Vec3d
validTarget
=
FuzzyTargeting
.
find
From
((
PathAwareEntity
)
entity
,
(
int
)
maxDistance
,
(
int
)
maxDistance
/
2
,
target
);
Vec3d
validTarget
=
FuzzyTargeting
.
find
To
((
PathAwareEntity
)
entity
,
(
int
)
maxDistance
,
(
int
)
maxDistance
,
target
);
if
(
validTarget
!=
null
&&
isWithinDistance
(
entityPos
,
validTarget
,
minDistance
,
maxDistance
))
{
Path
path
=
entity
.
getNavigation
().
findPathTo
(
validTarget
.
x
,
validTarget
.
y
,
validTarget
.
z
,
1
);
Path
path
=
entity
.
getNavigation
().
findPathTo
(
validTarget
.
x
,
validTarget
.
y
,
validTarget
.
z
,
4
);
if
(
path
!=
null
)
{
return
validTarget
;
}
...
...
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