[SPIGOT-686] custom villager trade still not work currectly Created: 12/Mar/15  Updated: 15/Mar/15  Resolved: 15/Mar/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, spigot
Environment:

linux/window



 Description   

https://hub.spigotmc.org/jira/browse/SPIGOT-515
This issue still not solved totally, In the spigot1.8.1 it will give you some incorrect item, but in 1.8.3 it just will not give you anything

(it works correctly in vanilla server of 1.8.3) so must something went wrong in spigot



 Comments   
Comment by Thinkofname [ 15/Mar/15 ]

Side effect of how our book handling works, can't fix

Comment by Weiyuan Zhu [ 14/Mar/15 ]

After test, I found the trade with NBT tag can only be trade once, and the second time it will stop you trading while it still shows this trade is available.

for example:
/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}

the resource for this trade can be found here:
/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}

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