Lithium (Fabric)

Lithium (Fabric)

22M Downloads

Withers escaping wither killer

Opened this issue ยท 7 comments

commented

Expected Behavior

Withers trapped and are suffocated to death.

Actual Behavior

Withers somehow destroy/escape after a period of time.

Reproduction Steps

  1. flip switch with marked sign
  2. Place soul sand against bottom of trap door
  3. wait for it to break, from my testing takes around 10k ticks before it breaks

If using carpet

  1. flip switch
  2. /player Steve spawn at -170.242 3 -70.344 facing -91 -39.2
  3. /player Steve use continuous
  4. /tick warp 15000
    Should break before the tick warp completes.

From my testing will break reliably under 15k ticks while running lithium
Tested in vanilla with tick warping for around 10 hours without it breaking.

attachments

World download. Wither killer -FallenBreath
If there is anymore info you need or anymore I can do to help let me know

commented

I am currently investigating the source of the issue. I reproduced it and now I am finding out why the cobble wall breaks.

commented

I wasn't able to reproduce this initially with the given instructions, but after letting the game run at warp speed indefinitely I finally managed a reproduction.

commented

I've narrowed down the offending patches to the entity.collisions package, which seem to be causing a bug which allows the Withers to clip outside of the chamber. There's been some recent work in this area that might be responsible for it, but we'll need to bisect commits to see where it's been introduced.

For the time being, you can add the following entry to your configuration file to disable the problematic patches (albeit at a significant cost to server performance):

mixin.entity.collisions=false
commented

Doubtful it will help narrow it down but does appear to be a bug introduced by 1.16.2 version of lithium.

commented

Upon further investigation, the issue only seems to appear when chunk.oversized_blocks is enabled, which was implemented in Lithium 0.5.2 for Minecraft 1.16.2 (fitting your own observation.)

I'm not sure what exactly is causing the problem, but my current theories are either:

a) There's a race condition in how we're tracking oversized block shapes in regards to pistons extending and retracting, which allows for the Withers to clip through blocks rarely in machines like this one, or...

b) Our collision code was already bugged before this optimization and allows mobs to escape without the extra blocks that now get eliminated when there are no over-sized blocks in a chunk.

You can adjust your config file to instead disable this very specific patch instead of all our entity collision optimizations in the mean time:

mixin.chunk.oversized_blocks=false

cc @2No2Name as they are the code owner for this patch.

commented

I found a problem in the oversized block counting code. It was just counting incorrectly (not decrementing the counter in most cases), which eventually lead to the counter (16 bit) overflowing. The collision code would then assume there are no oversized blocks (e.g. cobble wall), and therefore excluded them from the collision, as they were assumed to be out of reach of the movement.

commented

The fix for this issue has made it into Lithium 0.5.3.