Reika_Mods_Issues icon indicating copy to clipboard operation
Reika_Mods_Issues copied to clipboard

[Dragon API] Breaks Ars Magica

Open Gargule opened this issue 1 year ago • 11 comments

Some buffs (Regeneration, for example) from AM2 do nothing in presence of new version DragonAPI. With old version (tested on v26b) everything worked as intended. Need a fix, or at least need someone who can guide me where exactly i can fix it in AM2 by myself.

Gargule avatar Sep 16 '22 08:09 Gargule

I guess, it was broken somewhere here: ASM/Patchers/Hooks/Event/Entity/EntityAddPotionEvent.java But i'm total idiot in asm and i'm not sure.

Gargule avatar Sep 16 '22 09:09 Gargule

Sorry for mention, but @DrParadox7, if you care about AM2, you might be interested. (I know no one else who have forks of AM2 with new fixes)

Gargule avatar Sep 16 '22 20:09 Gargule

@TCLProject, you may be interested as well. (Very sorry for bothering all of you, but i really want to play with these mods)

Gargule avatar Sep 17 '22 02:09 Gargule

hmmm, I am going to test this myself as I have ars magica in my pack too. What were the steps to recreate this if you mind sharing?

theTyrfing avatar Sep 17 '22 04:09 theTyrfing

@TCLProject, you may be interested as well. (Very sorry for bothering all of you, but i really want to play with these mods)

I will not be able to do anything to try to fix this on account of Dragon API making a black screen when I load the game - with or without optifine. I am fairly certain AM2 buffs do not do anything too unique, though - If I were to guess, dragonAPI somehow manages to prevent mods from retrieving active effects (although this is just an assumption and I have absolutely no idea how one would manage to achieve something like this).

TCLProject avatar Sep 17 '22 13:09 TCLProject

hmmm, I am going to test this myself as I have ars magica in my pack too. What were the steps to recreate this if you mind sharing?

Just use last version of DragonAPI and try to cast regeneration spell, or something like that.

Gargule avatar Sep 17 '22 14:09 Gargule

I will not be able to do anything to try to fix this on account of Dragon API making a black screen when I load the game - with or without optifine. I am fairly certain AM2 buffs do not do anything too unique, though - If I were to guess, dragonAPI somehow manages to prevent mods from retrieving active effects (although this is just an assumption and I have absolutely no idea how one would manage to achieve something like this).

Interesting. My friend have permanent black screen with theese either. But i do not have any problems with this. Anyways, my debug messages isn't appear with last version of DAPI: ` @Override public void applyEffect(EntityLivingBase entityliving){ LogHelper.info("GARGULEDEBUG: Regen applied"); }

@Override
public void stopEffect(EntityLivingBase entityliving){
	LogHelper.info("GARGULEDEBUG: Regen stopped");
}

public boolean onUpdate(EntityLivingBase entityliving){

	LogHelper.info("GARGULEDEBUG: Regen ticking");
	…
	`

But appear with "old" version. My guess, it's because of potion effect event, that i mentioned above, but idk how that class transformation can break executing these three methods.

Edit: idk, what's wring with code.

Gargule avatar Sep 17 '22 14:09 Gargule

Also

I am fairly certain AM2 buffs do not do anything too unique

It's buff extends PotionEffect, not Potion, as most mods do.

Gargule avatar Sep 17 '22 14:09 Gargule

I tested it, and I am getting the potion buff status. However, it seems like the actual effect does not occur. Also, spell with Mana shield on them don't even cast properly. I think this is good place to start looking for a cause might be here: EntityAddPotionEvent.java

theTyrfing avatar Sep 17 '22 15:09 theTyrfing

Also It's buff extends PotionEffect, not Potion, as most mods do.

Minecraft uses PotionEffect to apply potion effects regardless. If the cause would be something to do with this, minecraft itself would be broken. All it does is call performEffect of the Potion from the performEffect of the PotionEffect, and Ars uses that in half the cases (and checks for whether the potion effect is active in an event in the other half).

TCLProject avatar Sep 18 '22 10:09 TCLProject

I will not be able to do anything to try to fix this on account of Dragon API making a black screen when I load the game [...]

Ahh, @TCLProject, the good ol' 4+(or was it 2?)-year-old bug (#2315, though the fix is unstable, further talk is in #2260) that breaks world rendering until the screen is resized. Try resizing your screen, that might fix it.

FavoritoHJS avatar Sep 20 '22 03:09 FavoritoHJS