Lib Multipart

Lib Multipart

46.7k Downloads

Server-Side Error When Breaking an Instant-Break Part in Survival Mode with Another Part in Same Blockspace

Kneelawk opened this issue ยท 1 comments

commented

The Issue

Steps to Reproduce

  • Use a mod like Wired Redstone that contains parts that override their calculateBreakingDelta to provide a BlockState that breaks instantly.
  • Place two parts in the same blockspace.
  • In survival-mode, break one of the parts.

An IllegalStateException complaining about the part that was just broken not having a valid index in its container is likely to be thrown. The error seems to appear roughly 4 out of 5 times.

Stack Trace

Here is a sample stack trace: https://pastebin.com/aDtxThRV

Other Issues

  • Kneelawk/WiredRedstone#22 is the associated issue on the Wired Redstone repository.
  • This issue might be a duplicate of #11 but the two issues seem to have significantly different stack-traces. I have decided to create a separate issue for this, given the different stack-trace, extra information, and steps required.
commented

I tested this out in an LMP development environment with a custom version of Wired Redstone that prints some debug statements and some custom code in AbstractPart#onBreak to print the stack trace, while also having -Dlibmultipart.debug=true set.

Here is the log: https://pastebin.com/5j540vqy

It appears that the ServerPlayerInteractionManager attempts to break the block twice. The second time, the ServerPlayerInteractionManagerMixin fails to identify the hit vector on the multipart block and just attempts to break the previously broken part.