Unidentified Enchantments

Unidentified Enchantments

22.6k Downloads

Sometimes the Descriptions persists on tools

Freshah opened this issue ยท 24 comments

commented

Hello! I can't seem to nail down exactly how to reproduce this bug, but I'll keep trying after posting this.

Sometimes the looted items' enchants appear hidden, sometimes not. I initially thought It was an incompatibility with Darkhax's Tool Stats mod, but removing it didn't help.
2022-04-14_19 29 32
2022-04-14_19 38 02
2022-04-14_19 32 55

commented

I think the first image, the horse armor, can be related to Allurement. The other 2 seem to be modded structures, so maybe my loot filter does not detect them. Which mod added those structures? Or which structure mods do you have?

commented

2022-04-14_19 29 47
It works with books though.

commented

I'm using 1.0.5 and suspected either Enchantment Descriptions, Tool Stats, or Allurement to be conflicting, no luck.

commented

I've been testing with Allurement so I think you're correct there. In the screenshots I'm using Repurposed Structures and Biome Makeover.

commented

My apologies for the weak issue report btw, I've confirmed this is just the Biome Makeover chests. Here's where they set the loot if that can be of use
https://github.com/Lemonszz/Biome-Makeover/blob/1.18/common/src/main/java/party/lemons/biomemakeover/level/feature/mansion/MansionFeature.java#L297

commented

I think it has to do with my filter for hiding stuff. If the mod does not put it in a "chest" folder it will not work currently (so modded structures can fail, vanilla should not). Another thing is that my hiding code can run before some other mod adds new enchantments, that's what happening with the horse armor. I'll see what I can do to fix them.

commented

thanks for taking a look, I think your explanation is correct, as the Supplementaries' Urns also fail, Bygone Nether's loot works, and it uses "chests" for the folder.

commented

I've made some changes and I think it should fix most of the issues. I'm going to test a bit more and than put it on curseforge with info on how to use it.

commented

This is awesome news! I'll run through the conflicts I noted and confirm that they're fixed and get back to you!

commented
[25Apr2022 21:41:25.049] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
net.minecraft.ReportedException: Exception ticking world
	at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:906) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:842) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:84) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:685) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.util.NoSuchElementException: minecraft:origin
	at net.minecraft.world.level.storage.loot.LootContext.m_165124_(LootContext.java:55) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at com.ferri.arnus.unidentifiedenchantments.loot.ChestCondition.test(ChestCondition.java:36) ~[unidentifiedenchantments-1.0.6.jar%23136!/:1.0.6]
	at com.ferri.arnus.unidentifiedenchantments.loot.ChestCondition.test(ChestCondition.java:17) ~[unidentifiedenchantments-1.0.6.jar%23136!/:1.0.6]
	at net.minecraftforge.common.loot.LootModifier.apply(LootModifier.java:39) ~[forge-1.18.2-40.0.45-universal.jar%23145!/:?]
	at net.minecraftforge.common.ForgeHooks.modifyLoot(ForgeHooks.java:1231) ~[forge-1.18.2-40.0.45-universal.jar%23145!/:?]
	at net.minecraft.world.level.storage.loot.LootTable.m_79129_(LootTable.java:89) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at vazkii.quark.content.mobs.entity.Stoneling.m_6518_(Stoneling.java:261) ~[Quark-3.2-349.jar%23115!/:3.2-349]
	at net.minecraft.world.level.NaturalSpawner.m_47038_(NaturalSpawner.java:186) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.world.level.NaturalSpawner.m_47045_(NaturalSpawner.java:126) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.world.level.NaturalSpawner.m_47029_(NaturalSpawner.java:116) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.server.level.ServerChunkCache.m_8490_(ServerChunkCache.java:355) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.server.level.ServerChunkCache.m_201698_(ServerChunkCache.java:309) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:281) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:902) ~[client-1.18.2-20220404.173914-srg.jar%23141!/:?]
	... 5 more
[25Apr2022 21:41:25.076] [Server thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID f5ead590-c0e7-46dd-9850-54d54a1b6d52
[25Apr2022 21:41:25.077] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: This crash report has been saved to: D:\other downloads\SepulcherINDEV\crash-reports\crash-2022-04-25_21.41.25-server.txt
[25Apr2022 21:41:25.077] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Stopping server

New crash when trying to /give loot

commented

What command did you use exactly (which loot table)? /loot will also no longer hide the loot with the new loot filter, only natural loot (in containers) will. Either way I'll add a fix for the crash.

commented

The issue is not caused by biome makeover, but by quark's Stoneling. I'll push a fix in a bit.

commented

/loot give username biomemakeover/mansion/etc

I couldn't pastebin or send the whole log because of file limitations, my apologies.

commented

I'll confirm the fix as soon as I can. My apologies if these constant reports have been a bother!

commented

Don't worry about it! I can't fix things if noone reports them to me! Just keep telling me if you find issues!

commented

I've confirmed that the recent Quark fix works and that the loot in the modded tables I reported were corrected, the new commands are great! It seems Curses aren't hidden, though? Not sure if intentional

commented

The curses should also be hidden? When are they not? (/loot give ... does not work anymore btw)

commented

Even after the /globalloot replace? That should not happen, my "curse" modifier is alwayq before my "hidden". I've also ran around a mantion and did not notice it. I'll check some more but that's strange.

commented

I noticed that in testing. Here's two screenshots from a biome makeover mansion chest.
2022-04-27_18 33 03
2022-04-27_18 33 01

Also, I confirmed Allurement doesn't conflict anymore either.

commented

{ "replace": true, "entries": [ "unidentifiedenchantments:curseloot", "unidentifiedenchantments:hiddenenchantingoverhauledloot", "hauntedharvest:rotten_apple", "hauntedharvest:rotten_apple_2", "farmersdelight:add_loot_abandoned_mineshaft", "farmersdelight:add_loot_bastion_hoglin_stable", "farmersdelight:add_loot_bastion_treasure", "farmersdelight:add_loot_end_city_treasure", "farmersdelight:add_loot_pillager_outpost", "farmersdelight:add_loot_ruined_portal", "farmersdelight:add_loot_shipwreck_supply", "farmersdelight:add_loot_simple_dungeon", "farmersdelight:add_loot_village_butcher", "farmersdelight:add_loot_village_plains_house", "farmersdelight:add_loot_village_taiga_house", "farmersdelight:add_loot_village_snowy_house", "farmersdelight:add_loot_village_desert_house", "farmersdelight:add_loot_village_savanna_house", "farmersdelight:scavenging_ham_from_pig", "farmersdelight:scavenging_ham_from_hoglin", "farmersdelight:scavenging_smoked_ham_from_pig", "farmersdelight:scavenging_smoked_ham_from_hoglin", "farmersdelight:scavenging_feather", "farmersdelight:scavenging_leather", "farmersdelight:scavenging_rabbit_hide", "farmersdelight:scavenging_shulker_shell", "farmersdelight:scavenging_string", "farmersdelight:slicing_cake", "farmersdelight:slicing_apple_pie", "farmersdelight:slicing_sweet_berry_cheesecake", "farmersdelight:slicing_chocolate_pie", "farmersdelight:straw_from_grass", "farmersdelight:straw_from_tall_grass", "farmersdelight:straw_from_mature_wheat", "farmersdelight:straw_from_mature_rice", "repurposed_structures:import_modded_loot", "nethersdelight:scavenging_hide_from_hoglin", "ecologics:music_disc_buried_treasure", "unidentifiedenchantments:hiddenloot" ] }

my modifiers

commented

Great! Thank you for reporting it. Don't be afraid to tell me if anything else breaks!

commented

is there a faster way for me to help test?

commented

Not sure, since I did not get the error. Maybe try a new world and see if it also happens. Otherwise I'll have another look but this should not happen.

commented

I had done something wrong, just found 2 pieces of cursed loot and it worked. We can finally close this one!