[ ] I am running the latest alpha version of MineColonies for my Minecraft version.
[x] I checked the MineColonies/Structurize wiki and made sure that my issue is not covered there.
[x] I made sure that this change request is not a duplicate of any existing change request.
Context
Minecraft Version: 1.19.2
MineColonies Version: 1.0.1207 ALPHA
Related Mods and their Versions:
Is your feature request related to a problem?
I am making a datapack and trying to get the Enchanter to produce Swift sneak enchanted books after a deep dark themed research is completed, the loot table therefore uses the minecolonies:research_unlocked predicate, however, the enchanter cant pass the predicate. If I use the exact same loot table on the fisherman, he passes the predicate and fishes these enchantments (the code was checked on the discord)
Prerequisites
Context
Is your feature request related to a problem?
I am making a datapack and trying to get the Enchanter to produce Swift sneak enchanted books after a deep dark themed research is completed, the loot table therefore uses the minecolonies:research_unlocked predicate, however, the enchanter cant pass the predicate. If I use the exact same loot table on the fisherman, he passes the predicate and fishes these enchantments (the code was checked on the discord)
Enhancement or Change description
After reading through the code, from what I understand, I found that the KILLER_ENTITY parameter is used to check the predicate, which ofc the enchanter is not, and isnt included in the enchanters loot context: https://github.com/ldtteam/minecolonies/blob/91cfa629367c9d7135696320708aab5165f4bc8e/src/api/java/com/minecolonies/api/loot/ResearchUnlocked.java#L41
Enchanter loot table call through the recipe with getLootContext() which doesn't include a KILLER_ENTITY when empty https://github.com/ldtteam/minecolonies/blob/01fdfaf3925c2ddf24fa3dea130a8a925b506918/src/main/java/com/minecolonies/coremod/entity/ai/citizen/enchanter/EntityAIWorkEnchanter.java#L260
It would be nice if this predicate was made to work for all non-killing colonists
Viewers