Waystones

Waystones

123M Downloads

Warp plates always fail on a dedicated server world

edralzar opened this issue ยท 0 comments

commented

Minecraft Version

1.20.1 (LTS)

Mod Loader

Fabric

Mod Loader Version

0.15.2 with API 0.91

Mod Version

14.1.2 / dev

Balm Version

7.3.0-SNAPSHOT

Describe the Issue

Any attempt at using any warp plate fails with the The shard inside this warp plate has lost its attunement message
However, the shard's tooltip is not indicating the same. Nothing in particular in logs.

Ran into it on my dedicated server, and it took me a long time to reproduce on my machine: turns out this doesn't occur on fabric client runs with a local save, but does occur when both running the fabric-client and fabric-server.

Here's what I found:

  • stepping on the warp plate resolves a WaystoneProxy corresponding to the attuned shard in WarpPlateBlockEntity#serverTick()
  • the WaystoneManager#get call returns the static clientStorageCopy (the server parameter is null)
  • that particular manager is empty (waystones.size() == 0) on the server side
  • as a result the isValid() for the original proxy is false and an error is sent to the client directly (no attempt at teleporting)

I think the root cause is the fact that WaystonesAPI#getBoundWaystone(ItemStack) always uses IAttunementItem#getWaystoneAttunedTo with a null server... This is fine on client side, but leads to the bug on server side.

I can provide a small save/world to reproduce if needed.

Logs

No response

Do you use any performance-enhancing mods (e.g. OptiFine) or custom server distributions (e.g. SpongeForge)?

No response