Apothic Attributes (AttributesLib)

Apothic Attributes (AttributesLib)

24M Downloads

Compatibility with Citizens2: forge:step_height_addition is blocked during NPC spawn/reload, breaking pathfinding Issue Body:

zoe-may opened this issue ยท 1 comments

commented

Environment:

  • Minecraft Version: 1.20.1
  • Forge Version: 47.4.6
  • Apothic Attributes (AttributesLib) Version: 1.3.7
  • Server Software: Hybrid server (e.g., Mohist, Arclight) running the Citizens2 plugin.

Problem Description:
There is a significant compatibility issue between Apothic Attributes (AttributesLib) and the Citizens2 plugin. When both are installed, the programmatic application of the forge:step_height_addition attribute fails during the NPC spawning process.

This results in NPCs being created with a default (or zero) step height, making them unable to step up single-block heights. Consequently, their pathfinding is broken. When using a command like /npc path, the NPC will walk up to a 1-block-high obstacle and get stuck indefinitely.

Further Findings & Temporary Workaround:
I have discovered that it is possible to manually fix an individual NPC after it has spawned using the vanilla attribute command:
/attribute <npc_uuid> forge:step_height_addition base set 1

After running this command, the specific NPC's step height is corrected, and its pathfinding works perfectly.

However, this fix is only temporary. The manually applied attribute is reset whenever the server restarts or the /citizens reload command is used. This is because Citizens despawns and respawns its NPC entities during these processes, and the new entity is once again created with the incorrect step height.

This finding strongly suggests that Apothic Attributes is not blocking the attribute itself, but is specifically interfering with the API or event that Citizens2 uses to apply attributes during the entity's spawn/initialization phase.

Troubleshooting Steps Taken:

  1. Confirmed that removing Apothic Attributes completely resolves the issue.
  2. Attempted to force a higher minimum value for forge:step_height_addition in the attributes.json config file, which had no effect.
  3. Successfully used the vanilla /attribute command to prove the attribute can be modified post-spawn, but the fix is not persistent due to the Citizens reload/respawn mechanic.

Steps to Reproduce:

  1. Set up a Forge server with Minecraft 1.20.1, Forge 47.4.6, and a hybrid framework.
  2. Install Apothic Attributes (AttributesLib) v1.3.7.
  3. Install the latest version of the Citizens2 plugin.
  4. In-game, create an NPC: /npc create Test
  5. Place a single solid block on the ground.
  6. Use the pathfinding command: /npc path. The NPC will get stuck at the block.
  7. (Optional) Run /attribute <Test's UUID> forge:step_height_addition base set 1.
  8. Run /npc path again. The NPC will now correctly step over the block.
  9. Run /citizens reload and repeat step 6. The NPC will be stuck again.

This issue prevents the reliable use of the Citizens2 plugin for any pathfinding-related tasks. It would be greatly appreciated if you could investigate this conflict with the NPC spawn/attribute application process. Thank you

Wrong situation:
Image

Normal situation:
Image

commented

Hybrid servers (and the issues introduced by them) are not supported. You'll have to figure out a workaround on your own.