CloudNetService / CloudNet

A modern application that can dynamically and easily deliver Minecraft oriented software
https://cloudnetservice.eu
Apache License 2.0
369 stars 115 forks source link

CloudnetNPC Entities in RC10 not despawning #1348

Closed KxmischesDomi closed 4 months ago

KxmischesDomi commented 6 months ago

Stacktrace

Actions to reproduce

  1. Have a static task with the npc module enabled. (Tested 1.20.4)
  2. Create an npc with any entity type.
  3. Stop server with "/stop" ingame. (Also happens with cloudnet stop command)
  4. Look carefully for the npc that is now duplicated

CloudNet version

10.01 21:32:15.520] INFO: CloudNet Blizzard 4.0.0-RC10-SNAPSHOT 51483928 [10.01 21:32:15.520] INFO: Discord: https://discord.cloudnetservice.eu/ [10.01 21:32:15.520] INFO:
[10.01 21:32:15.520] INFO: ClusterId: ----**** [10.01 21:32:15.520] INFO: NodeId: Node-1 [10.01 21:32:15.521] INFO: Head-NodeId: Node-1 [10.01 21:32:15.521] INFO: CPU usage: (P/S) 1.3/9.15/100% [10.01 21:32:15.521] INFO: Node services memory allocation (U/R/M): 10512/10512/27000 MB [10.01 21:32:15.521] INFO: Threads: 97 [10.01 21:32:15.521] INFO: Heap usage: 80/256MB [10.01 21:32:15.521] INFO: JVM: Debian 17 (OpenJDK 64-Bit Server VM 17.0.9+9-Debian-1deb12u1) [10.01 21:32:15.521] INFO: Update Repo: CloudNetService/launchermeta, Update Branch: nightly

Other

image (Also the illusioner likes to do his magic even when it isnt duplicated)

Also the infolines are being duplicated. Most notable is it when the npcs hold items and by the fact that you can no longer interact with them as npcs but normal entities.

Issue uniqueness

0utplay commented 6 months ago

Thanks for your bug report. Can you please share the server log and the npc configuration as well as the ProtocolLib version that is running on the server so I can try to reproduce the issue

KxmischesDomi commented 6 months ago

Module Config:

{
  "entries": [
    {
      "targetGroup": "Lobby",
      "infoLineDistance": 0.25,
      "knockbackDistance": 0.7,
      "knockbackStrength": 0.8,
      "npcPoolOptions": {
        "spawnDistance": 50,
        "actionDistance": 20,
        "tabListRemoveTicks": 30
      },
      "emoteConfiguration": {
        "emoteIds": [
          2,
          3,
          49
        ],
        "onJoinEmoteIds": [
          4,
          20
        ],
        "onKnockbackEmoteIds": [
          37
        ],
        "minEmoteDelayTicks": 400,
        "maxEmoteDelayTicks": 600,
        "syncEmotesBetweenNPCs": false
      },
      "inventoryConfiguration": {
        "inventorySize": 54,
        "dynamicSize": true,
        "defaultItems": {
          "emptyLayout": {
            "material": "EGG",
            "subId": -1,
            "displayName": "§7%name%",
            "lore": [
              " ",
              "§8● §e%state%",
              "§8● §7%online_players%§8/§7%max_players%",
              "§8● §7%motd%"
            ]
          },
          "onlineLayout": {
            "material": "EMERALD",
            "subId": -1,
            "displayName": "§7%name%",
            "lore": [
              " ",
              "§8● §e%state%",
              "§8● §7%online_players%§8/§7%max_players%",
              "§8● §7%motd%"
            ]
          },
          "fullLayout": {
            "material": "REDSTONE",
            "subId": -1,
            "displayName": "§7%name%",
            "lore": [
              " ",
              "§8● §e%state%",
              "§8● §7%online_players%§8/§7%max_players%",
              "§8● §7%motd%"
            ]
          },
          "ingameLayout": {
            "material": "REDSTONE",
            "subId": -1,
            "displayName": "§7%name%",
            "lore": [
              "§8● §eIngame",
              "§8● §7%online_players%§8/§7%max_players%",
              "§8● §7%motd%"
            ]
          }
        },
        "perGroupLayouts": {},
        "fixedItems": {}
      }
    }
  ]
}

Sadly I cannot share the whole server log as there is too much internal information in it but I can share most of it:

[18:42:58] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[18:43:00] [ServerMain/INFO]: Loaded 1174 recipes
[18:43:00] [ServerMain/INFO]: Loaded 1271 advancements
[18:43:01] [Server thread/INFO]: Starting minecraft server version 1.20.4
[18:43:01] [Server thread/WARN]: ****************************
[18:43:01] [Server thread/WARN]: YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.
[18:43:01] [Server thread/WARN]: YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.
[18:43:01] [Server thread/WARN]: FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/
[18:43:01] [Server thread/WARN]: ****************************
[18:43:01] [Server thread/INFO]: Loading properties
[18:43:01] [Server thread/INFO]: This server is running Purpur version git-Purpur-2120 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d05e78b on HEAD)
[18:43:02] [Server thread/INFO]: Server Ping Player Sample Count: 12
[18:43:02] [Server thread/INFO]: Using 4 threads for Netty based IO
[18:43:02] [Server thread/INFO]: [ChunkTaskScheduler] Chunk system is using 1 I/O threads, 4 worker threads, and gen parallelism of 4 threads
[18:43:03] [Server thread/WARN]: [Pufferfish] SIMD operations are available for your server, but are not configured!
[18:43:03] [Server thread/WARN]: [Pufferfish] To enable additional optimizations, add "--add-modules=jdk.incubator.vector" to your startup flags, BEFORE the "-jar".
[18:43:03] [Server thread/WARN]: [Pufferfish] If you have already added this flag, then SIMD operations are not supported on your JVM or CPU.
[18:43:03] [Server thread/WARN]: [Pufferfish] Debug: Java: 17.0.9, test run: true
[18:43:03] [Server thread/INFO]: Default game type: SURVIVAL
[18:43:03] [Server thread/INFO]: Generating keypair
[18:43:03] [Server thread/INFO]: Using epoll channel type
[18:43:03] [Server thread/INFO]: Paper: Using libdeflate (Linux x86_64) compression from Velocity.
[18:43:03] [Server thread/INFO]: Paper: Using OpenSSL 3.0.x (Linux x86_64) cipher from Velocity.
[18:43:03] [Server thread/INFO]: [ViaVersion] Loading server plugin ViaVersion v4.9.2
[18:43:03] [Server thread/INFO]: [ViaVersion] ViaVersion 4.9.2 is now loaded. Registering protocol transformers and injecting...
[18:43:04] [Via-Mappingloader-0/INFO]: [ViaVersion] Loading block connection mappings ...
[18:43:04] [Via-Mappingloader-0/INFO]: [ViaVersion] Using FastUtil Long2ObjectOpenHashMap for block connections
[18:43:04] [Server thread/INFO]: [ViaBackwards] Loading translations...
[18:43:04] [Server thread/INFO]: [ViaBackwards] Registering protocols...
[18:43:04] [Server thread/INFO]: [CloudNet-Bridge] Loading server plugin CloudNet-Bridge v4.0.0-RC10-SNAPSHOT
[18:43:05] [Server thread/INFO]: [ProtocolLib] Loading server plugin ProtocolLib v5.2.0-SNAPSHOT-679
[18:43:06] [Server thread/INFO]: [spark] Loading server plugin spark v1.10.59
[18:43:06] [Server thread/INFO]: [CloudNet-Signs] Loading server plugin CloudNet-Signs v4.0.0-RC10-SNAPSHOT
[18:43:06] [Server thread/INFO]: [Vault] Loading server plugin Vault v1.7.3-b131
[18:43:06] [Server thread/INFO]: [ViaBackwards] Loading server plugin ViaBackwards v4.9.1
[18:43:06] [Server thread/INFO]: [CloudNet-NPCs] Loading server plugin CloudNet-NPCs v4.0.0-RC10-SNAPSHOT
[18:43:08] [cluster-ClusterId{value='65a036bb3d82775d46aea6d5', description='null'}-172.20.0.3:27017/INFO]: [org.mongodb.driver.connection] Opened connection [connectionId{localValue:1, serverValue:417}] to 172.20.0.3:27017
[18:43:08] [cluster-rtt-ClusterId{value='65a036bb3d82775d46aea6d5', description='null'}-172.20.0.3:27017/INFO]: [org.mongodb.driver.connection] Opened connection [connectionId{localValue:2, serverValue:416}] to 172.20.0.3:27017
[18:43:08] [cluster-ClusterId{value='65a036bb3d82775d46aea6d5', description='null'}-172.20.0.3:27017/INFO]: [org.mongodb.driver.cluster] Monitor thread successfully connected to server with description ServerDescription{address=172.20.0.3:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=21, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=521929066}
[18:43:09] [Server thread/INFO]: [ProtocolLib] Enabling ProtocolLib v5.2.0-SNAPSHOT-679
[18:43:09] [Server thread/INFO]: [Vault] Enabling Vault v1.7.3-b131
[18:43:09] [Server thread/INFO]: [Vault] [Permission] SuperPermissions loaded as backup permission system.
[18:43:09] [Server thread/INFO]: [Vault] Enabled Version 1.7.3-b131
[18:43:09] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
[18:43:09] [Server thread/WARN]: The server will make no attempt to authenticate usernames. Beware.
[18:43:09] [Server thread/WARN]: Whilst this makes it possible to use Velocity, unless access to your server is properly restricted, it also opens up the ability for hackers to connect with any username they choose.
[18:43:09] [Server thread/WARN]: Please see https://docs.papermc.io/velocity/security for further information.
[18:43:09] [Server thread/WARN]: To change this, set "online-mode" to "true" in the server.properties file.
[18:43:09] [Server thread/INFO]: Preparing level "world"
[18:43:10] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[18:43:11] [Server thread/INFO]: Time elapsed: 790 ms
[18:43:11] [Server thread/INFO]: [ViaVersion] Enabling ViaVersion v4.9.2
[18:43:11] [Server thread/INFO]: [ViaVersion] ViaVersion detected server version: 1.20.3 (765)
[18:43:11] [Server thread/INFO]: [CloudNet-Bridge] Enabling CloudNet-Bridge v4.0.0-RC10-SNAPSHOT
[18:43:11] [Server thread/INFO]: [spark] Enabling spark v1.10.59
[18:43:11] [Server thread/INFO]: [spark] Using Paper ServerTickStartEvent for tick monitoring
[18:43:11] [Server thread/INFO]: [spark] Starting background profiler...
[18:43:12] [Server thread/INFO]: [CloudNet-Signs] Enabling CloudNet-Signs v4.0.0-RC10-SNAPSHOT
[18:43:12] [Server thread/INFO]: [ViaBackwards] Enabling ViaBackwards v4.9.1
[18:43:12] [Server thread/INFO]: [CloudNet-NPCs] Enabling CloudNet-NPCs v4.0.0-RC10-SNAPSHOT
[18:43:12] [Server thread/INFO]: Running delayed init tasks
[18:43:12] [Craft Scheduler Thread - 2 - ViaVersion/INFO]: [ViaVersion] Finished mapping loading, shutting down loader executor!

ProtocolLib Version: 5.2.0-SNAPSHOT-679

0utplay commented 6 months ago

Thanks, I can reproduce this bug. I'm taking a look and trying to resolve the issue