Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4675

BlockState Inventory#.setItem() doesn't set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Major Major
    • None
    • None
    • Multiple computers tried running different OS and hardware including Windows 7, Windows 10, KUbuntu, Intel I5 6600K, Intel Pentium 2020U, Intel Atom (Unknown version), 4-12GB of RAM

    • git-Bukkit-d3ed151
    • Ships 6.0.0.0
    • Yes

      Furnace furnace = (Furnace)block.getState();
      ItemStack is = ItemStack(Material.OBSIDIAN, 1);
      ItemStack is2 = furnace.getInventory().getItem(this.position);
      furnace.getInventory().setItem(this.position, is);
      System.out.println("Setting Position: " + this.position + " was " + is2 + " to " + is + ".");
      furnace.update(true, true);
      System.out.println("\t" + furnace.getInventory().getItem(this.position));
      

      I have tried this code on 1.12.2 and all versions of 1.13.2 for Spigot, the 1.12.2 works correctly however does not work with 1.13.2. Ive known about this issue since the first release for 1.13.2 however never got round to creating the issue.

       

      This is the output given on 1.13.2

      20:14:54 INFO]: Setting Position: 0 was null to ItemStack{OBSIDIAN x 1}.
      [20:14:54 INFO]:        null
      

            Unassigned Unassigned
            mosemister Moses Mister
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: