Hey, im trying to do a realistics npcs and i use citizens for the npc because i don't want to reimplement it my self but i can't hook in npc as the doc says, like it seem that the CitizensEnableEvent never occur
my main class:
39 messages · Page 1 of 1 (latest)
Hey, im trying to do a realistics npcs and i use citizens for the npc because i don't want to reimplement it my self but i can't hook in npc as the doc says, like it seem that the CitizensEnableEvent never occur
my main class:
(billetde20) Can't hook in Citizens
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
!logcheck
!pastejava @fossil thunder
Help us help you by pasting your Java code to https://paste.denizenscript.com/New/Other?selected=other-java and linking it back here.
Content of Java Paste #127472: Main class... pasted 2024/10/24 05:21:00 UTC-07:00, Paste length: 5057 characters across 151 lines, Content: package com.meekdev.meenpcs;
!logcheck
Incorrect upload of log reuploaded to pastebin at https://paste.denizenscript.com/View/127473
Paper version 1.21.1-119-master@7cd4f2c (2024-10-03T15:19:34Z)
Citizens v2.0.35-SNAPSHOT (build 3593) -- (Outdated build, behind by 9)
@hallow wraith
4 (:white_check_mark: Online)
ProtocolLib v5.3.0-SNAPSHOT-732
Multiverse-Core v4.3.13 - Multi-world configuration plugins may affect NPCs in unexpected ways.
Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Failed to parse structure: Failed to get element ResourceKey[minecraft:item_modifier / ml_holomenu:page_change] at position 174: ...age_change<--[HERE] :warning: Log contains error messages.
@fossil thunder do you have your gradle or pom?
pom
yeah let me send it
Content of HTML or XML Paste #127474: POm.XML... pasted 2024/10/24 05:53:43 UTC-07:00, Paste length: 3517 characters across 104 lines, Content: <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven...
@fossil thunder hmm it seems correct, not sure why it's not working
yeah i tried everything
this message dosen't get sent
even these
oh
OH
I THINK I MADE IT WORK
recompiling it made it work
does citizen have a pathfinding system?
Yes
too weird
private void moveToLocation(Location target) {
if (!npc.isSpawned()) return;
double speed = BASE_SPEED + (random.nextDouble() * SPEED_VARIANCE - SPEED_VARIANCE/2);
npc.getNavigator().getLocalParameters()
.speedModifier((float) speed)
.distanceMargin(0.8);
npc.getNavigator().setTarget(target);
this.targetLocation = target;
}
public void cleanup() {
if (movementTask != null) {
movementTask.cancel();
}
}```
Making it walk faster but slower when it approch it goal
how to make a npc walk or run
@fossil thunder you can set the speed, I think that's an odd way to change the speed
what value should i put to make it loke running or walking
walking is 1, running might be 1.1? not sure
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@fossil thunder