TCLProject / ArsMagica2-5

Ars Magica 2.5
15 stars 8 forks source link

AM2 crashes when removing optifine because it looks for optifine in directories other than /mods #32

Open brandyyn opened 9 months ago

brandyyn commented 9 months ago

image https://pastebin.com/MEsuspKG

https://github.com/Mithion/ArsMagica2/issues/1108 https://github.com/Mithion/ArsMagica2/issues/1223

AirBurn0 commented 9 months ago

Funny problem that occurs with: OptiFine, DragonAPI and Thaumcraft (hardcoded vals). Try to rename one of the following (except OptiFine), and AM2 NEVER detects it! xD Cuz AM2 just runs over Minecraft root folder's file tree and looks for some Thaumcraft.jar Rename to something not optifine like kinda opti_fine or something and things start to be more funny. Once I renamed my Thaumcraft and laughed for a long time.

BTW, I'm on my way to fix it.

AirBurn0 commented 9 months ago

This may solve the issue.

TCLProject commented 8 months ago

The folder/name detection is dodgy at best, but it's what's a last resort. Detection by modid refuses to work, and I have very little clue as to why. If AirBurn wants to PR his changes, I will accept without hesitation

AirBurn0 commented 8 months ago

Detection by modid refuses to work, and I have very little clue as to why.

As far as I understand it, at the stage of loading the core mods, Forge simply does not load any non-core mods yet, and this makes modid useless. Thaumcraft and DragonAPI have core mods, their presence is originally checked by Mithion (but for some strange reasons only for DragonAPI). Some mods cannot be detected this way, and here I came up with only two ways: run through the folder to which the forge refers, open each file and look for mcmod.info, which is a little not fun and mcmod.info may simply not exist, or do like Mithion, checking for existence of a class at runtime - this is a simple but working solution.

If AirBurn wants to PR his changes, I will accept without hesitation

In my PR there is actually nothing other than these two approaches, and the extra code associated with running through folders has been removed, because there is no need for them. However, I only tested this on myself and may not have taken into account some factors due to which it will not work for someone, so I don’t recommend merging.

brandyyn commented 8 months ago

This may solve the issue.

doesn't fix it :(

AirBurn0 commented 7 months ago

This may solve the issue.

doesn't fix it :(

Yes, I see why. Sorry for messing up, this time it should works a little better. Please test and tell me if the problem was solved.

brandyyn commented 7 months ago

This may solve the issue.

doesn't fix it :(

Yes, I see why. Sorry for messing up, this time it should works a little better. Please test and tell me if the problem was solved.

works!!

brandyyn commented 4 months ago

@AirBurn0 hey, can you help me?

soulbound in am2.5 works for me in singleplayer and on a server it always returns my items but when my girlfriend dies on my server it just deletes her soulbound items entirely :/

image https://github.com/TCLProject/ArsMagica2-5/blob/master/src/main/java/am2/PlayerTracker.java @TCLProject has disappeared so I desperately need your help with this one.

AirBurn0 commented 4 months ago

@AirBurn0 hey, can you help me?

soulbound in am2.5 works for me in singleplayer and on a server it always returns my items but when my girlfriend dies on my server it just deletes her soulbound items entirely :/

@TCLProject has disappeared so I desperately need your help with this one.

TBH, soulbound always has been such a pain in the ass. I'm not 100% sure, but as far as I know, ANY item-keeping mechanics, except vanilla gamerule keepInventory, like Charm of Keeping (Twilight Forest), Resolute Ivy (Botania), or etc. CAN cause permanent loss of item upon death on any currently known AM2 fork with working soulbound enchantment. The problem has been known for a long time, but I don’t know how to solve it. Usually they solve it like this: 1) Accept it as a fact and remove the enchantment from items any way possible; 2) Remove the mechanics of keeping items from mod's code, leaving the enchantment itself in the game for the sake of a useless gimmick that is giving item Dispel spell immunity; 3) Remove enchantment from the game completely.

Third option is the one I've seen most often, cuz soulbound causes duplicate glitches, and dispel is lame anyway (it's in the frequently disabled spells list at 2 place, gives 1place to Appropriation spell)

So how should I help with this?

brandyyn commented 4 months ago

@AirBurn0 hey, can you help me? soulbound in am2.5 works for me in singleplayer and on a server it always returns my items but when my girlfriend dies on my server it just deletes her soulbound items entirely :/ @TCLProject has disappeared so I desperately need your help with this one.

TBH, soulbound always has been such a pain in the ass. I'm not 100% sure, but as far as I know, ANY item-keeping mechanics, except vanilla gamerule keepInventory, like Charm of Keeping (Twilight Forest), Resolute Ivy (Botania), or etc. CAN cause permanent loss of item upon death on any currently known AM2 fork with working soulbound enchantment. The problem has been known for a long time, but I don’t know how to solve it. Usually they solve it like this:

  1. Accept it as a fact and remove the enchantment from items any way possible;
  2. Remove the mechanics of keeping items from mod's code, leaving the enchantment itself in the game for the sake of a useless gimmick that is giving item Dispel spell immunity;
  3. Remove enchantment from the game completely.

Third option is the one I've seen most often, cuz soulbound causes duplicate glitches, and dispel is lame anyway (it's in the frequently disabled spells list at 2 place, gives 1place to Appropriation spell)

So how should I help with this?

but it consistently works for me and it consistently doesnt work for my girlfriend on the same server, i assume its only binding to my account for some reason? i have no idea why. original ars magica 2 soul bound works no problems though...

AirBurn0 commented 4 months ago

but it consistently works for me and it consistently doesnt work for my girlfriend on the same server, i assume its only binding to my account for some reason? i have no idea why. original ars magica 2 soul bound works no problems though...

I can't say why that happens from that. Soulbound code hasn't been changed for like 9 years: image It's kinda account-specific? Or device-specific? Or server-specific? Or maybe it's about player's inventory state before dying (like having some items that conflicts with soulbound)? Really hard to help with it when I don't know anything but that. Maybe try to catch a bug on video?

AirBurn0 commented 4 months ago

Maybe that was the case?