mojira.dev

Eevee17_

Assigned

No issues.

Reported

MC-296621 Autocomplete text in chat and command blocks is not aligned properly Duplicate MC-276359 /clear command does not clear the player's inventory Duplicate MC-276358 Cannot clear survival inventory by shift-clicking Destroy Item in creative mode Duplicate MC-275629 Minecarts floating after being launched Confirmed MC-274944 Spectators Keep Chests and Barrels Open Duplicate MC-256915 Blocks not updating if powered by redirected redstone dust. Duplicate MC-256913 Redstone dust not pointing towards quickly moved observer Community Consensus MC-254114 Sugar cane not updating when water is removed Duplicate

Comments

This bug does not affect shulker boxes (another container with an opening/closing animation).

There is a difference in Minecraft's code (simplified) between the affected containers (chests and barrels) and shulker boxes:

Affected containers:

useWithoutItem(Level, Player, /*...*/) {
  if (Level.isClientSide) {
    return SUCCESS; // player opened the container
  } else {
    //...
  }
}

Shulker box (unaffected):

useWithoutItem(Level, Player, /*...*/) {
  if (Level.isClientSide) {
    return SUCCESS; // player opened the container
  } else if (Player.isSpectator()) {
    return CONSUME; // player is in spectator mode, so they didn't actually open the container
  } else {
    //...
  }
}

 

Shulker boxes have the following code (simplified) that checks if they are in spectator mode and removes the interaction while the affected containers do not:

else if (Player.isSpectator()) {
  return CONSUME;
}

 

Potential Fix: Adding the code that I highlighted from the shulker box to the affected containers' code might fix the bug.