Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-133478

1.13 is mutating the constant EMPTY itemstack

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.13-pre8, 1.15.1 Pre-release 1
    • None
    • Confirmed
    • (Unassigned)

      I think we're saved mostly from really bad bugs by the strict instance equality check in ItemStack.isEmpty, but nonetheless this should be fixed.

      You can see this happening by inserting the following code below the public ItemStack constructors:

      private void E() {
          if (this.h && this == ItemStack.a) throw new AssertionError("TRAP"); // CraftBukkit
            this.h = false;
            this.h = this.isEmpty();
        }
      

      And then right clicking a block with a sword.

            Unassigned Unassigned
            md_5 [Mod] md_5
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: