Immersive Engineering

Immersive Engineering

134M Downloads

[1.18] Crash on opening Manual on Lectern

TeamSpen210 opened this issue ยท 1 comments

commented

Description of the issue:

Placing a manual on a lectern works perfectly fine, but if you try right clicking it the manual GUI appears briefly, then the game crashes. This is reproduced in a minimal test world, in my real one JEI also ends up in the trace. Doing some digging, it looks like openManual() is being called serverside:

@SubscribeEvent
public void onBlockRightclick(RightClickBlock event)
{
BlockPos pos = event.getPos();
BlockState state = event.getWorld().getBlockState(pos);
if(!(state.getBlock() instanceof LecternBlock)||event.getPlayer()==null)
return;
BlockEntity tile = event.getWorld().getBlockEntity(pos);
if(tile instanceof LecternBlockEntity&&((LecternBlockEntity)tile).getBook().getItem() instanceof ManualItem)
{
if(!event.getPlayer().isShiftKeyDown())
{
ImmersiveEngineering.proxy.openManual();
event.setCanceled(true);
}

Crashlog:

https://gist.github.com/TeamSpen210/d0b3dbfa9a56e5a07e6ea508d6da1964
I included both the crash report and game log because they have different tracebacks.

Versions & Modlist

  • MC: 1.18.1
  • Forge: 39.0.5
  • IE: 7.0.0-142
commented

"Fixed" by 6fd2dfb

But now the lectern just doesn't work with the manual. You can place it down, but not open it, because the item stored is not synced to the client.