Hi, I am used to Java coding, but not so much to forge.
And even after multiple days of googling, I still struggle.
Right now, I am trying to read (and later modify) villager data. The idea is to be able to reset the last level of the villager, including exp and trades.
Right now I am struggling to understand how to read the data, so I get the trades, level and exp.
What I have found: with
entity.getEntityData().getAll();
I get data, but I haven't found any information about what the entry means (only numbers for 1 to 18, while 18 is "VillagerData").
Side question: Is there a way to directly get the "VillagerData" without a "foreach"?
Okay, there I have "VillagerData", but according to this
1.18.2 VillagerData
I can get and set level and profession, but I don't see trades and exp.
Any attempt to get "CompundTag" like
CompoundTag test = entity.getEntityData();
does not work.
How can I get the data so I can modify it?
I am using forge-1.19.2 43.2.0.
Chees