[SPIGOT-4675] BlockState Inventory#.setItem() doesn't set Created: 21/Mar/19 Updated: 21/Mar/19 Resolved: 21/Mar/19 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Major |
Reporter: | Moses Mister | Assignee: | Unassigned |
Resolution: | Invalid | Votes: | 0 |
Labels: | 1.13, Craftbukkit, blocks, bug, bukkit | ||
Environment: |
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 |
Version: | git-Bukkit-d3ed151 |
Plugin: | Ships 6.0.0.0 |
Guidelines Read: | Yes |
Description |
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 |
Comments |
Comment by md_5 [ 21/Mar/19 ] |
If you’re calling update you must use the snapshot inventory |