Minecraft Comes Alive (MCA)

Minecraft Comes Alive (MCA)

13M Downloads

Villager Generation Override

Kismette opened this issue ยท 2 comments

commented

Tried to create a villager with custom trade using command block. Here is what I added:

/summon Villager ~5 ~ ~ {Profession:0,CustomName:"Derpy",CustomNameVisible:1,Offers:{Recipes:[{buy:{id:"stone",Count:1},maxUses:10,sell:{id:"red_flower",Count:1,Damage:4}},{buy:{id:"stone",Count:1,Damage:1},maxUses:10,sell:{id:"red_flower",Count:1,Damage:2}}]}}

Using this does generate random MCA villagers and doesn't specify the name and trade from what I added in the code.

commented

Will look into this.

commented

This is a result of doOverwriteVillager in EventHooksFML.java. I have a partial solution which works by passing the entity through the constructor (and rigging all uses of it to be null safe). This works but it cannot disable api and every so often the name displayed desyncs with the name given until the game is reloaded.

That said, the partial solution does allow for specifying what that villager will trade.