mcmonkeyprojects / Sentinel

Combat NPCs for Spigot!
MIT License
168 stars 84 forks source link

Sentinel shadow entities #296

Closed SlimeDog closed 5 years ago

SlimeDog commented 5 years ago
>version
[06:28:29] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-093165d-ba575a5 (MC: 1.14.2) (Implementing API version 1.14.2-R0.1-SNAPSHOT)
[06:28:29] [Server thread/INFO]: You are running the latest version
>version Citizens
[07:03:22] [Server thread/INFO]: Citizens version 2.0.25-SNAPSHOT (build 1700)
[07:03:22] [Server thread/INFO]: Website: http://www.citizensnpcs.co
[07:03:22] [Server thread/INFO]: Authors: aPunch and fullwall
>version Sentinel
[06:29:29] [Server thread/INFO]: Sentinel version 1.9.2 (build 261)
[06:29:29] [Server thread/INFO]: Author: mcmonkey

Sentinel/config.yml

I have four Sentinel tame wolves and one Player NPC near the spawn point in a creative world (world). World was --forceUpgrade converted from 1.13.2. In 1.14.x, the Sentinels have acquired shadow wolf entities in the four locations, oriented per the Sentinel's positions (including yaw). The shadow entities

So the shadow entities are clearly tied to the Sentinel entities somehow.

After citizens reload, there are multiple shadow entities per Sentinel. All of them display the same names as the related Sentinels. As before, the shadow entitles do not appear in the output of npc list.

There are Sentinels in other (survival) worlds that do not acquire shadow entities.

The issue has been present since 1.14-pre1. I have rebuild the world several times since, but the issue always returns. The same NPC/Sentinel configuration worked without issues from 1.8.3 through 1.13.2, and is currently working correctly in 1.13.2.

Citizens/saves.yml for one of the four Sentinels; the others are similar, with different locations

npc:
  '1':
    name: Killer
    uuid: 57523cee-360d-4468-a0fa-46949dfbb3fe
    traits:
      spawned: true
      lookclose:
        enabled: true
        range: '5.0'
        realisticlooking: false
        enableRandomLook: false
        randomLookDelay: 60
      type: WOLF
      location:
        world: world
        x: '-14.5'
        y: '64.0'
        z: '-14.5'
        yaw: '-45.0'
        pitch: '0.0'
      waypoints:
        linear:
          points:
            '0':
              location:
                world: world
                x: '-14.5'
                y: '64.0'
                z: '-14.5'
                yaw: '-45.0'
                pitch: '0.0'
        provider: linear
      sentinel:
        stats_ticksSpawned: 82811973
        stats_timesSpawned: 9165
        stats_arrowsFired: 0
        stats_potionsThrow: 0
        stats_fireballsFired: 0
        stats_punches: 2981
        stats_attackAttempts: 178216
        stats_damageTaken: 8.841066865921022
        stats_damageGiven: 22940.97999984026
        range: 20.0
        damage: 10.0
        armor: -1.0
        health: 20.0
        ranged_chase: false
        close_chase: true
        invincible: true
        fightback: true
        attackRate: 30
        healRate: 30
        guardingUpper: 0
        guardingLower: 0
        needsAmmo: false
        safeShot: true
        respawnTime: 100
        chaseRange: 64.0
        enemyDrops: false
        enemyTargetTime: 0
        stats_snowballsThrown: 0
        stats_eggsThrown: 0
        stats_skullsThrown: 0
        stats_pearlsUsed: 0
        attackRateRanged: 30
        speed: 2.0
        greet_range: 10.0
        autoswitch: false
        accuracy: 0.0
        spawnPoint:
          world: world
          x: '-14.5'
          y: '64.0'
          z: '-14.5'
          yaw: '-45.0'
          pitch: '0.0'
        realistic: false
        reach: 3.0
        avoidRange: 10.0
        runaway: false
        guard_distance_minimum: 7.0
        guard_selection_range: 4.0
        allTargets:
          targets:
            '0': MONSTER
            '1': PASSIVE_MOB
        allIgnores:
          targets:
            '0': PLAYER
            '1': OWNER
      wolfmodifiers:
        angry: false
        collarColor: RED
        sitting: false
        tamed: true
      age:
        age: 0
        locked: true
      owner:
        owner: PLAYER_NAME_REDACTED
        uuid: PLAYER_UUID_REDACTED
    traitnames: owner,wolfmodifiers,type,location,lookclose,mounttrait,age,waypoints,sentinel,spawned,inventory
    navigator:
      stationaryticks: 100
      speedmodifier: '2.0'
      avoidwater: true
      usedefaultstuckaction: true
      pathfindingrange: '100.0'
      distancemargin: '1.5'
    metadata:
      protected: true
SlimeDog commented 5 years ago

Change the Sentinels to cats

npc select Killer
npc type CAT

and restart the server. The shadow entities are not present.

Change the Sentinels back to wolves. The shadow entities reappear.

SlimeDog commented 5 years ago

Create non-Sentinel wolf NPC

npc create --type wolf

No shadow entities for that NPC. Restart the server. No shadow entities for that NPC.

Citizens/saves.yml for that NPC

  '42': 
    name: XYZZY
    uuid: a0af5e67-f644-4fb3-8548-dd8bb2cd3be7
    traits:
      location:
        world: world
        x: '-1.1079'
        y: '64.0'
        z: '1.2078'
        yaw: '28.3096923828125'
        pitch: '0.0'
      age:
        age: 0
        locked: true
      type: WOLF
      spawned: true
      owner:
        owner: PLAYER_NAME_REDACTED
        uuid: PLAYER_UUID_REDACTED
   traitnames: owner,type,mounttrait,location,spawned,age
    navigator:
      speedmodifier: '1.0'
      avoidwater: false
      usedefaultstuckaction: true
mcmonkey4eva commented 5 years ago

I'm having trouble replicating this. Running the exact same builds as in your opening post, Setup: /npc create bob --type wolf /npc wolf -t /npc path + set 1 point /npc lookclose /npc inventory (just to add the trait just in case as you have it set) /trait sentinel /sentinel guard mcmonkey4eva (to have it move away from it's starting point to better reveal dup entities) /sentinel invincible Test: /citizens save /citizens reload move around a bit just the one wolf here, no shadow.


My guess here is in the direction of potential plugin interference (the issue may only appear with some given other plugin installed) or world setting issue (a gamerule or similar that is required to cause it)

Can you please test for plugin conflicts? https://wiki.citizensnpcs.co/Plugin_Conflict

SlimeDog commented 5 years ago

Add wolf modifiers to XYZZY

      wolfmodifiers:
        angry: false
        collarColor: RED
        sitting: false
        tamed: true

with the same result. No shadow entities.

SlimeDog commented 5 years ago

Gamerules (other than defaults) in this creative world

gamerule announceAdvancements false
gamerule commandBlockOutput false
gamerule doDaylightCycle false
gamerule doFireTick false
gamerule doWeatherCycle false
gamerule sendCommandFeedback true

Gamerules are different in the other (survival) worlds, so I will test that possibility.

Can you please test for plugin conflicts?

I do have a rather extensive plugin set. I will run isolation tests later today.

SlimeDog commented 5 years ago
>version
[08:55:04] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-01d0f04-455023c (MC: 1.14.2) (Implementing API version 1.14.2-R0.1-SNAPSHOT)
[08:55:04] [Server thread/INFO]: You are running the latest version
>version citizens
[08:55:00] [Server thread/INFO]: Citizens version 2.0.25-SNAPSHOT (build 1700)
[08:55:00] [Server thread/INFO]: Website: http://www.citizensnpcs.co
[08:55:00] [Server thread/INFO]: Authors: aPunch and fullwall
>version Sentinel
[08:55:08] [Server thread/INFO]: Sentinel version 1.9.2 (build 261)
[08:55:08] [Server thread/INFO]: Author: mcmonkey

Spigot 1.14.2 (Jenkins 2237)

Isolation testing completed. The world in question is world, so Multiverse (which has not been updated, and was therefore a contender for interaction effects) did not get in the way. The tests involved only two plugins. Between tests, the server was stopped, the plugins changed, and the server restarted.

Server invocation: java -Xms1M -Xmx4G -XX:+UseG1GC -Dfile-encoding=UTF-8 -jar spigot.jar nogui --universe ./UNIVERSE

I posted

Please let me know when you have captured the files, so I can remove them. I can provide additional files if needed.

mcmonkey4eva commented 5 years ago

I'm unclear whether you actually followed the conflict test procedure. For a good test where smaller tests fail to find anything, you ideally should start a new local server (just spin up a Spigot server on your own PC) with only Citizens and Sentinel with default configs on a defaultly generated world, and see if you can replicate it. If you can't, begin transferring things from the original server til it replicates (send the world over - does it start then? If so, it's something in the world. If not, try config files. If not, try plugins, etc)

SlimeDog commented 5 years ago

I did not get to that part yet. I will, but I'm AFK until next week. I could get to my test servers remotely, so I stripped down the server on which it occurred to get to the point above, in hopes that it would help. If not... More later. Should I remove the files, if they are not helpful?

SlimeDog commented 5 years ago

OK, I found a stable internet connection. I rebuilt the world, and (naturally) the shadow entities do not exist. So, "something in the world." Not very satisfying, but resolved in the instant.

I removed the files.