Is there anyway to check what biome type a villager is? I'm trying to write an event that hooks onto the VillagerTradesEvent and I want to check for what biome type a villager is. In the code, IVillagerType contains all the info about the types themselves, and even provides a method that returns the IVillagerType of the villager. I'm still newish to modding with a decent amount of java experience, so I'm sorry if this question is worded poorly.
I tried comparing something like this:
if(IVillagerType.byBiome(Biomes.JUNGLE) == IVillagerType.JUNGLE){}
but it doesn't work.
Does anyone know a solution, or is this even possible? Thank you