Resplendent prism enchantment ignores Astral Sorcery config file
LuciusV opened this issue ยท 10 comments
I cannot reproduce this behavior.
Are you sure you are indeed editing the astralsrocery.toml in that world you're playing in?
not the /defaultconfigs/astralsorcery.toml
but the one in /world/serverconfig/astralsorcery.toml
(for a server instance) or /saves/<TheWorldName>/serverconfig/astralsorcery.toml
(for a specific singleplayer world)?
I see, could you please give me some time to do clear test in new world and report if it is here and my exact actions to reproduce?
I am sorry to say that bug is still here for
Forge 36.1.31
Astral Sorcery 1.16.5-1.13.12
ObserverLib 1.16.5-1.5.3
My astralsorcery.toml's (saves\tst1813\serverconfig) config:
[registries.amulet_enchantments]
#Defines a whitelist of which enchantments can be rolled and buffed by the enchantment-amulet. The higher the weight, the more likely that roll is selected.Format: <enchantment-registry-name>;<weight>
amulet_enchantments = ["minecraft:protection;0", "minecraft:fire_protection;0", "minecraft:feather_falling;0", "minecraft:blast_protection;0", "minecraft:projectile_protection;0", "minecraft:respiration;0", "minecraft:aqua_affinity;0", "minecraft:thorns;0", "minecraft:depth_strider;0", "minecraft:frost_walker;0", "minecraft:soul_speed;0", "minecraft:sharpness;0", "minecraft:smite;0", "minecraft:bane_of_arthropods;0", "minecraft:knockback;0", "minecraft:fire_aspect;0", "minecraft:looting;2", "minecraft:sweeping;0", "minecraft:efficiency;0", "minecraft:silk_touch;1", "minecraft:unbreaking;0", "minecraft:fortune;2", "minecraft:power;0", "minecraft:punch;0", "minecraft:flame;0", "minecraft:infinity;0", "minecraft:luck_of_the_sea;0", "minecraft:lure;0", "minecraft:loyalty;0", "minecraft:impaling;0", "minecraft:riptide;0", "minecraft:channeling;0", "minecraft:multishot;0", "minecraft:quick_charge;0", "minecraft:piercing;0", "minecraft:mending;0", "astralsorcery:night_vision;1", "astralsorcery:scorching_heat;0", "twilightforest:fire_react;0", "twilightforest:chill_aura;0", "naturesaura:aura_mending;0", "cyclic:multishot;0", "cyclic:auto_smelt;0", "simplyjetpacks:fuel_efficiency;0", "cofh_core:holding;0", "ensorcellation:magic_protection;0", "ensorcellation:displacement;0", "ensorcellation:fire_rebuke;0", "ensorcellation:frost_rebuke;0", "ensorcellation:air_affinity;0", "ensorcellation:exp_boost;0", "ensorcellation:gourmand;0", "ensorcellation:reach;0", "ensorcellation:vitality;0", "ensorcellation:damage_ender;0", "ensorcellation:damage_illager;0", "ensorcellation:damage_villager;0", "ensorcellation:cavalier;0", "ensorcellation:frost_aspect;0", "ensorcellation:instigating;0", "ensorcellation:leech;0", "ensorcellation:magic_edge;0", "ensorcellation:vorpal;0", "ensorcellation:excavating;0", "ensorcellation:hunter;0", "ensorcellation:quick_draw;0", "ensorcellation:trueshot;0", "ensorcellation:volley;0", "ensorcellation:angler;0", "ensorcellation:pilfering;0", "ensorcellation:furrowing;0", "ensorcellation:tilling;0", "ensorcellation:weeding;0", "ensorcellation:bulwark;0", "ensorcellation:phalanx;0", "ensorcellation:soulbound;0"]
If I delete all enchantments with zero weight and leave amulet_enchantments = ["minecraft:looting;2", "minecraft:silk_touch;1", "minecraft:fortune;2"] it still give me enchantments I deleted from this whitelist.
Closing this one off, did another series of 100 re-rolls today using the below config on the latest releases:
[registries.amulet_enchantments]
#Defines a whitelist of which enchantments can be rolled and buffed by the enchantment-amulet. The higher the weight, the more likely that roll is selected.Format: <enchantment-registry-name>;<weight>
amulet_enchantments = ["minecraft:protection;10", "minecraft:mending;2", "astralsorcery:night_vision;1", "astralsorcery:scorching_heat;1"]
And never got an enchantment outside of that config file for the world EXCEPT when I modified the file without a relaunch first.
MC 1.16.5
Forge 36.1.32
Astral Sorcery 1.132.12
Curios 4.0.5.2
Observerlib 1.5.3
JEI 7.7.0.106
Unable to reproduce.
The issue seems to lie with getWeightedRandomEntry
in MiscUtils.java
, which doesn't check to see if weights are 0.
https://github.com/HellFirePvP/AstralSorcery/blob/1.16-indev/src/main/java/hellfirepvp/astralsorcery/common/util/MiscUtils.java#L140
(But anyway, why not just remove the enchantments from the config?)
Because they appear even if removed from their mod config, which I of course already did with unwanted enchantments.. They are not unregistred if removed from config. Will it accept float weight of 0.000000001?
With weight like this
[registries.amulet_enchantments] #Defines a whitelist of which enchantments can be rolled and buffed by the enchantment-amulet. The higher the weight, the more likely that roll is selected.Format: <enchantment-registry-name>;<weight> amulet_enchantments = ["minecraft:protection;10000000", "minecraft:fire_protection;5000000", "minecraft:feather_falling;5000000", "minecraft:blast_protection;2000000", "minecraft:projectile_protection;5000000", "minecraft:respiration;2000000", "minecraft:aqua_affinity;2000000", "minecraft:thorns;1000000", "minecraft:depth_strider;2000000", "minecraft:frost_walker;2000000", "minecraft:soul_speed;1000000", "minecraft:sharpness;10000000", "minecraft:smite;5000000", "minecraft:bane_of_arthropods;5000000", "minecraft:knockback;5000000", "minecraft:fire_aspect;2000000", "minecraft:looting;2000000", "minecraft:sweeping;2000000", "minecraft:efficiency;10000000", "minecraft:silk_touch;1000000", "minecraft:unbreaking;5000000", "minecraft:fortune;2000000", "minecraft:power;10000000", "minecraft:punch;2000000", "minecraft:flame;2000000", "minecraft:infinity;1000000", "minecraft:luck_of_the_sea;2000000", "minecraft:lure;2000000", "minecraft:loyalty;5000000", "minecraft:impaling;2000000", "minecraft:riptide;2000000", "minecraft:channeling;1000000", "minecraft:multishot;2000000", "minecraft:quick_charge;5000000", "minecraft:piercing;10000000", "minecraft:mending;2000000", "astralsorcery:night_vision;1000000", "astralsorcery:scorching_heat;1000000", "naturesaura:aura_mending;1", "cyclic:multishot;1", "cyclic:auto_smelt;1", "ensorcellation:exp_boost;1", "ensorcellation:leech;1", "ensorcellation:vorpal;1", "ensorcellation:quick_draw;1", "ensorcellation:trueshot;1", "ensorcellation:soulbound;1", "ensorcellation:damage_villager;1", "ensorcellation:hunter;1", "ensorcellation:bulwark;1", "ensorcellation:magic_protection;1", "ensorcellation:pilfering;1", "ensorcellation:furrowing;1", "ensorcellation:reach;1", "cofh_core:holding;1", "ensorcellation:instigating;1", "ensorcellation:excavating;1", "ensorcellation:angler;1", "ensorcellation:magic_edge;1"]
I still get these lowest weights pretty frequent.
If delete config file, default values are generated from 1 to 10, 1 can't be maximum
Removing the entry should prevent the enchantment from showing up at all. The weight randomization uses Minecraft's "net.minecraft.util.WeightedRandom" function, and I don't have that open in front of me to see if it has limits, or what it checks between. If there is no entry, it cannot select it regardless.
I suspect the insane number you've used is causing the problems. Define "pretty frequently" in that?
edit: are you editing the config in the world save directory for that world you're testing in? If you're editing a copy in defaultconfigs directory, did you remove the one in the world save directory?