Sign items with invalid JSON in Text1 tag are used in creative
When giving a player on creative mode a sign with the following command
/give @p sign 10 0 {BlockEntityTag:{Text1:"1"}}
the sign will act strange. This will only occur when the value for Text1 is invalid JSON.
Once you have the sign, just place it down and see the number of signs in the stack go down to 1 in the stack, then MC-105982 blocks it.
Other tags I have tried didn't result in the issue occurring.
Upon dropping the negative signs, you can't pick them up (as I would expect with the way picking up items is processed)
Code analysis by Marcono1234 can be found in this comment.
Environment
Details:
Minecraft Version: 1.9.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 146356432 bytes (139 MB) / 255328256 bytes (243 MB) up to 1029177344 bytes (981 MB)
JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -Xmn128M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
Launched Version: 1.9.2
LWJGL: 2.9.4
OpenGL: Intel(R) HD Graphics 4200 GL version 4.3.0 - Build 20.19.15.4331, Intel
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.
Using VBOs: Yes
Is Modded: Probably not. Jar signature remains and client brand is untouched.
Type: Client (map_client.txt)
Resource Packs:
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 4x Intel(R) Core(TM) i3-4010Y CPU @ 1.30GHz
Created Issue:
Giving sign item with invalid JSON in Text1 tag create negative sign item
When giving a player on creative mode a sign with the following command
/give @p sign 10 0 {BlockEntityTag:{Text1:"1"}}
the sign will act strange. This will only occur when the value for Text1 is invalid JSON.Once you have the sign, just place it down and see the number of signs in the stack go down, eventually into negative numbers.
Other tags I have tried didn't result in the issue occurring.
Upon dropping the negative signs, you can't pick them up (as I would expect with the way picking up items is processed)
Environment
Details:
Minecraft Version: 1.9.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 146356432 bytes (139 MB) / 255328256 bytes (243 MB) up to 1029177344 bytes (981 MB)
JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -Xmn128M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
Launched Version: 1.9.2
LWJGL: 2.9.4
OpenGL: Intel(R) HD Graphics 4200 GL version 4.3.0 - Build 20.19.15.4331, Intel
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.Using VBOs: Yes
Is Modded: Probably not. Jar signature remains and client brand is untouched.
Type: Client (map_client.txt)
Resource Packs:
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 4x Intel(R) Core(TM) i3-4010Y CPU @ 1.30GHz
When giving a player on creative mode a sign with the following command
/give @p sign 10 0 {BlockEntityTag:{Text1:"1"}}
the sign will act strange. This will only occur when the value for Text1 is invalid JSON.Once you have the sign, just place it down and see the number of signs in the stack go down, eventually into negative numbers.
Other tags I have tried didn't result in the issue occurring.
Upon dropping the negative signs, you can't pick them up (as I would expect with the way picking up items is processed)
Code analysis by Marcono1234 can be found in this comment.
is duplicated by
Giving sign item with invalid JSON in Text1 tagcreate negative sign itemSign items with invalid JSON in Text1 tag are used in creative
When giving a player on creative mode a sign with the following command
/give @p sign 10 0 {BlockEntityTag:{Text1:"1"}}
the sign will act strange. This will only occur when the value for Text1 is invalid JSON.Once you have the sign, just place it down and see the number of signs in the stack go down, eventually into negative numbers.
Other tags I have tried didn't result in the issue occurring.
Upon dropping the negative signs, you can't pick them up (as I would expect with the way picking up items is processed)
Code analysis by Marcono1234 can be found in this comment.
When giving a player on creative mode a sign with the following command
/give @p sign 10 0 {BlockEntityTag:{Text1:"1"}}
the sign will act strange. This will only occur when the value for Text1 is invalid JSON.Once you have the sign, just place it down and see the number of signs in the stack go down to 1 in the stack, then
MC-105982blocks it.Other tags I have tried didn't result in the issue occurring.
Upon dropping the negative signs, you can't pick them up (as I would expect with the way picking up items is processed)
Code analysis by Marcono1234 can be found in this comment.
Duplicate of MC-101120

Confirmed for
Please link to this comment in the description
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
It looks like the reason why this happens is because the method net.minecraft.item.ItemSign.onItemUse(ItemStack, EntityPlayer, World, BlockPos, EnumHand, EnumFacing, float, float, float) is not catching the exception. Because of this the methods net.minecraft.client.multiplayer.PlayerControllerMP.func_187099_a(EntityPlayerSP, WorldClient, ItemStack, BlockPos, EnumFacing, Vec3d, EnumHand) and net.minecraft.server.management.PlayerInteractionManager.func_187251_a(EntityPlayer, World, ItemStack, EnumHand, BlockPos, EnumFacing, float, float, float) cannot restore the item count and damage for creative players.
Can confirm.
I've also noticed that if you put nothing in the Text1 (such as Text1:"") it doesn't do this
Can confirm for 1.10
Fixed for 16w36a
If you place the sign, you get this error in logs: