Forbidden and Arcanus

Forbidden and Arcanus

33M Downloads

[BUG] Orb of Temporary Flight

drouarb opened this issue ยท 4 comments

commented

Hello,

Description

Yesterday we experienced some weird behaviors with Orb of Temporary flight.

  • My friend consumed the orb in the end and got the effect.
  • I was in the overworld and also got the effect for no reason.
  • Once the timer reached 0:00 it stayed at 0:00 and the flying effect was still available for both of us.
  • He died and lost the effect
  • Another friend in the end was able to reproduce the bug and make his timer goes to 0:00
  • Once he got back to the overworld through end portal, he lost the effect
  • I kept it a couple of hours, I was able to switch dimensions, go to the nether and even go in the end
  • I lost it because I ate a suspicious stew found in the end.

What I didn't tried:

  • Disconnect and log back in
  • Come back from the end with the duplicated effect

Notes

It looks like it's the same problem as #176 but we are playing on a private self hosted forge server.
I tried to reproduce, but I didn't succeed and since Orb of Temporary Flight can only be found, I don't want to waste them all.
When the bug occured, the server was experiencing some lags due to world generation (4 players exploring), maybe it's something related ?

Versions

Minecraft: 1.16.5
Forge version: 36.2.8
Modpack: Create: Above & Beyond 1.1
Forbiden & Arcanus: 16.2.0-Beta4

Modpack modifications

Server-side

  • Added terraforged
  • Added Sulfuric (Phosphor forge port)

Client-side

  • Optifine
commented

Yes, it's a private server, we have something vanilla-ish forge, we don't need/use any permission/plugin. BTW, I don't know if it's relevant but every players are op.

EDIT:
I'm doing some research, I think there is two bugs in one.
The first one is the timer bug, it could be related to the ValhesiaCore timer. I can't check VamlhesiaCore source code, I didn't found it. This bug allows you to keep an effect after the end of the timer. Maybe it could be related to a duration check being == instead of <= and if the server is lagging, the tick is skipped and the effect goes underflow.

The second bug is the bug giving you the effect even if you are not close. When we use an Orb of Temporary Flight it gives it to every nearby players. We have the Corspe Mod and when you die it instantiate a DummyPlayer. I found that I had a corspe nearby the player that used the orb. Maybe my corpse recieved the effect and it rerouted it to my characted in the overworld.

EDIT2:
I'm looking ValhesiaCore source code with jd-gui, it looks like SimpleCounter are shared across all players. On init, the a new SimpleCounter is registered in CounterHelper. And in AttachCapabilitiesListener a new CounterProvider is created to store counters for the player, however it looks like CounterProvider is copying references to SimpleCounter instead of creating a new one for each player. If I understood right, every players are sharing the same SimpleCounter, this could be the reason why everyone get the buff.

commented

So you are playing on a plain forge server without anything like Mohist?

commented

I will take a look at the counter sharing thing (not sure if I have the time to fix it in 1.16 but the 1.17 port will definitely receive a fix for this). No idea about why it doesnt remove the effect though. Maybe you could try looking at your player data after the effect should have run out (with /data get entity ), it should contain a section about the counters. If there the value is 0 and the counter is deactivated it might be a packet sync problem.

commented

Both bugs should be fixed now in 1.18.1-2.0.2