[SPIGOT-1897] Data lost after changing where a block is in your inventory. Created: 12/Mar/16 Updated: 12/Mar/16 Resolved: 12/Mar/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | William Gaylord | Assignee: | Unassigned |
Resolution: | Invalid | Votes: | 0 |
Labels: | 1.9, bug, inventory | ||
Environment: |
latest build as of 3/11/16, Java 8 ,debain jessie |
Attachments: |
![]() |
Plugin: | Slabs (My own plugin) |
Description |
I have a basic plugin that sees if you have a slab in hand and if its named "Upside down half slab". It then flips the placed block from a normal slab to and upside down one. The problem is when I move the item from the inventory slot it was added to the mechanic stops working. Which I am unsure of the full reason why. I will attach the plugin so you can test it your self. I will also point you to its source on github. https://github.com/chibill/Slabs/tree/1.2.0 I am using this version of my plugin code because purrur half slabs don't seem to behave like normal half slabs code wise. (My dynamic slab detection uses reflection to detect all slabs and it seems to have broke.) |
Comments |
Comment by William Gaylord [ 12/Mar/16 ] |
I figured it out. The server is changing the encoding of the string used in the name. Why I don't know. its really strange. |
Comment by William Gaylord [ 12/Mar/16 ] |
So is there a way to fix it? This has only happened after the 1.9 update and nothing changed in my code base. The extra data is just setting the name of the item. Which does not change. So I am unsure why it no longer works after you move the stack around. |
Comment by md_5 [ 12/Mar/16 ] |
Notice how this only happens in creative mode? |
Comment by William Gaylord [ 12/Mar/16 ] |
The thing is it works untill you move the slab from the slot on your hotbar the plugin added it too. And it worked perfectly in 1.8 then 1.9 comes around and as soon as you move the block from the slot it was added to it stops working. I will make a short video of the problem. EDIT: |
Comment by md_5 [ 12/Mar/16 ] |
Looking at your code it assumes that slab orientation is stored in meta, which I don't think it is? In any case an isolated example would be helpful. |