FlansMods / FlansMod

Flan's Mod for Minecraft
Other
236 stars 149 forks source link

Options to disable/modify mod items added to mobs #1315

Open BeachSturmHub opened 4 years ago

BeachSturmHub commented 4 years ago

Issue: Mobs Wearing Modded Armor/Adding config or option to remove modded armor from mobs.

Hello Flans, I decided to make a Github account for the first time to learn more on how to code. But more specifically, to address the regarding issue. Playing this mod is fun especially with the content packs. However, I hate the issue with mobs gaining Flans mod armor and replacing the vanilla items. It doesn't sit well when playing and I found it problematic. Sometimes mobs might even hold flans mod armor in their hand for reasons unknown and there is no orthodox way to change it without interfering with the .class or deleting the teams file in the content packs.

All I ask for, is a way to address this issue or fixing it outright. Either by adding more config options including the option of removing flans mod armor or items from mobs or patching it by necessary means.

Gratitude To Thee

-Beach

BobTheHat commented 4 years ago

Yeah, this is pretty annoying as well. The only solution for me was to open each content pack's .jar with 7zip and delete the teams.txt file. Really looking forward to seeing a config option for this in the future.

havetc commented 1 year ago

I think the implementation would be very simple, it's a shame it weren't properly implemented when the feature was added The armor spawn rate is defined there: https://github.com/FlansMods/FlansMod/blob/71ba7ed065d906d48f34ca471bbd0172b5192f6b/src/main/java/com/flansmod/common/FlansMod.java#L171 with a hardcoded public static float armourSpawnRate = 0.25F;

It would just be needed to edit the public static void syncConfig() function in order to add a new getFloat for the armourSpawnRate Value https://github.com/FlansMods/FlansMod/blob/71ba7ed065d906d48f34ca471bbd0172b5192f6b/src/main/java/com/flansmod/common/FlansMod.java#L769

I don't have the toolchain installed, but if someone has already everything needed to compile and test an edit, I'd be okay with filling a pull request and letting someone else compile and test it!