
Some mobs never drop Mob Charm Fragments
Jabele10 opened this issue ยท 7 comments
While playing All the Mods 10 I noticed that I don't get any mob charm fragments from some specific (vanilla) mobs like skeletons, zombies and witches. Most other mobs, especially those added by other mods always have the chance of dropping charms. I thought of pure bad luck but as I now have nearly 40k fragments from evokers and pillagers but still none from zombies etc. this would be so unlikely to happen.
I assumed this as bug in this mod and inspected some of the code and probably found the problem:
The method handleAddingFragmentDrops() in /src/main/java/reliquary/items/MobCharmRegistry.java only checks if the set DYNAMICALLY_REGISTERED
contains the registry name. However there is also a Map ENTITY_NAME_CHARM_DEFINITIONS
which contains statically registered charms (exactly those I couldn't get any fragments of) which never gets checked for the registry key.
I didn't test this but I think
if (!DYNAMICALLY_REGISTERED.contains(regName)) { return; }
should be changed to
if (!(DYNAMICALLY_REGISTERED.contains(regName) || ENTITY_NAME_CHARM_DEFINITIONS.containsKey(regName))) { return; }
or even
if (!ENTITY_NAME_CHARM_DEFINITIONS.containsKey(regName)) { return; }
as registerDynamicCharmDefinitions() also calls registerMobCharmDefinition(MobCharmDefinition charmDefinition)
.
However I am not sure if it's this Map or the REGISTERED_CHARM_DEFINITIONS
Map which should be checked or if this is actually intended.
And that works exactly as expected - those charm fragments have crafting recipes
Okay, I see that. I think in my configuration these crafting recipes are disabled. I can't check right now but I remeber those not showing up in JEI.
In case I am correct with these recipes being disabled, you cannot get these charms in any way other than re-enabling the recipes? Shouldn't there be some sort of fallback so if you can't craft them, you can get them normally by looting or so?
Well what is the reason for disabling them then? Usually the reason is to not allow players to craft and use the items so it wouldn't make sense to drop the fragments in that case
I didn't disable them myself, this was the default configuration in ATM10. I'm not sure why they disabled this.
I still think it would be useful to handle this case as there are two separate flags for crafting recipes and the drops.
ATM10 doesn't seem to remove these recipes (I have recipes for skeleton/zombie/witch fragment there). Also if a modpack decides to remove specific fragment recipe. I can't just have it drop instead because I don't know if they removed it by mistake (which would be odd) or if they are intentionally removing that specific one and in that case I would be breaking that by dropping fragment instead.
That's odd. I didn't change the configuration (at least for Reliquary) but in reliquary-common.toml dropCraftingRecipesEnabled was set to false. After changing it to true I can craft fragments for zombies, skeletons, etc.
However I still can't craft fragments for Piglin Brutes, there is no recipe which seems intentional as these do not drop anything specific for them.
At first I actually thought the problem might be the disabled recipes but as Piglin Brutes didn't drop specific items usable for crafting (golden axes could easily be crafted) but still no fragments this didn't make any sense to me. Is it actually intentional that you can't get fragments for Piglin Brutes?
Anyway, this is not about specific charms but for all of those with a recipe. Of course a specific charm, disabled via the entityBlockList, should neither be craftable nor droppable but I think charms with a potential recipe which is just disabled through dropCraftingRecipesEnabled=false
(which disables all recipes) should still be obtainable somehow.
If the recipe gets removed any other way (e.g. KubeJS) I mostly agree that these shouldn't just drop. However if a modpack developer really wants to disable a specific charm this should be done via the entityBlockList instead of just removing the recipe.
You can craft the witch/zombie/skeleton fragments with dropCraftingRecipesEnabled = false
. That setting is just for the direct drops from these mobs to be craftable. And no it won't allow you to craft fragments for mobs that don't have fragment recipes. And that's why they drop from the mobs instead in that case.