[SPIGOT-515] custom villiager trade with NBT tags don't work currectly Created: 02/Feb/15  Updated: 02/Feb/15  Resolved: 02/Feb/15

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Weiyuan Zhu Assignee: Thinkofname
Resolution: Won't Fix Votes: 0
Labels: 1.8, bug, nbt
Environment:

ubuntu


Attachments: JPEG File 9f70100bjw1eotedsqdfzj20fp0533z8.jpg     JPEG File 9f70100bjw1eoteecb2jpj208e03b0sz.jpg    

 Description   

Hello,
I made an exchange system by custom villiager trade which use written book with NBT tags, it shows correctly but when I use big notes to change smaller one, it turns back to the bigger notes as shown:
I've test the command on the origin minecraft 1.8.1, it just work correctly without this bug.
***I tested these again in minecraft 1.8, it has the same bug. So this is a 1.8 bug which is fixed by mojang in 1.8.1.
[​IMG]
it shows correctly
[​IMG]
but after place it, it turns back to the one before trade(but number changed)

here is the command to summon this villiager and command to summon another villager which use to get such a book with emerad:

/summon Villager ~ ~1 ~-3 {CustomName:"银行柜员(兑换)",CustomNameVisible:1,Profession:2,Career:1,CareerLevel:16,Offers:{Recipes:[{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:1,tag:{title:400(1024)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:4,tag:{title:100(256)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:4,tag:{title:100(256)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:1,tag:{title:400(1024)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:1,tag:{title:100(256)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:4,tag:{title:40(64)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:4,tag:{title:40(64)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:1,tag:{title:100(256)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:1,tag:{title:40(64)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:4,tag:{title:10(16)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:4,tag:{title:10(16)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:1,tag:{title:40(64)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:1,tag:{title:10(16)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:4,tag:{title:4(4)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:4,tag:{title:4(4)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:1,tag:{title:10(16)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:1,tag:{title:4(4)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:4,tag:{title:1(1)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:{id:written_book,Count:4,tag:{title:1(1)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}},sell:{id:written_book,Count:1,tag:{title:4(4)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}}]},Equipment:[{},{},{},{},{}],DropChances:[0.0F,0.085F,0.085F,0.085F,0.085F],Attributes:[

{Name:generic.movementSpeed,Base:0}

,

{Name:generic.knockbackResistance,Base:1000}

],Invulnerable:1,Silent:1}

/summon Villager ~4 ~1 ~-3 {CustomName:"银行柜员(买入)",CustomNameVisible:1,Profession:2,Career:1,CareerLevel:16,Offers:{Recipes:[{rewardExp:false,maxUses:2147483647,uses:0,buy:

{id:emerald,Count:64}

,sell:{id:written_book,Count:1,tag:{title:40(64)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:

{id:emerald,Count:16}

,sell:{id:written_book,Count:1,tag:{title:10(16)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:

{id:emerald,Count:4}

,sell:{id:written_book,Count:1,tag:{title:4(4)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}},{rewardExp:false,maxUses:2147483647,uses:0,buy:

{id:emerald,Count:1}

,sell:{id:written_book,Count:1,tag:{title:1(1)元,author:Ree_Z,generation:2,pages:["{text:'XJcraft银行发行',extra:[

{text:'流通货币,仿冒必究'}

]}"]}}}]},Equipment:[{},{},{},{},{}],DropChances:[0.0F,0.085F,0.085F,0.085F,0.085F],Attributes:[

{Name:generic.movementSpeed,Base:0}

,

{Name:generic.knockbackResistance,Base:1000}

],Invulnerable:1,Silent:1}



 Comments   
Comment by Thinkofname [ 02/Feb/15 ]

If its fixed in 1.8.1 we will get the fix when we update to 1.8.2

Generated at Thu Apr 03 13:22:13 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.