Blood Magic

Blood Magic

90M Downloads

Galacticraft-Blood Magic compatibility seems broken.

UnPure opened this issue ยท 15 comments

commented

Hey there.
It seems like Galacticraft isnt compatible with Blood Magic.
I found some old threads where it sounds like it should be fixed.
But with the latest version of both mods it seems broken again.
The Blood Altar just stays empty instead of filling.
Any chance to get that fixed in the future?
I would like to use both mods.

Sorry for my bad english. I hope its not to hard to understand.

commented

This was discussed here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1290532-1-7-10-2-1-6-4-blood-magic-v1-1-0-updated-jul-13?page=85

WayOfTime suggested that a possible fix would be to play with the current entity.getClass().equals(EntityPlayerMP.class) calls with something which either also checks the class name for GCCorePlayerMP or which uses instanceof and hope that people don't grief the system.

Unfortunately neither of these appear in master as of the posting of this comment.

commented

This has been fixed as far as I know as of v1.2

Edit: This tweet was referencing this very issue.
https://twitter.com/WayofTime/status/502272061184966656

commented

master still has plenty of instances of "entity.getClass().equals(EntityPlayerMP.class)" incl. in the dagger of sacrifice

commented

All I can tell you is that he said it was fixed and working for him and that I have them both installed and I have no problems with Blood Magic anymore.

commented

https://github.com/WayofTime/BloodMagic/blob/master/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java#L59 would suggest otherwise, but perhaps I'm misreading it. Where can I get a 1.2 build from? (I can't work out how to build from master)

commented

Thanks Yatekko, I'll try that for now.

commented

Hi I'm one of the Galacticraft developers.

In 1.7.2 or 1.7.10, if you install the PlayerAPI mod in your mods folder (just the PlayerAPI.jar, you don't need anything else which uses it) then any recent version of Galacticraft will auto-switch to using that instead of the GCEntityPlayerMP class. My guess is that that should fix any issue of this kind.

For a "proper" fix which does not need the PlayerAPI, I suggest in Blood Magic's code replacing all occurrences of entity.getClass().equals(EntityPlayerMP.class) with this code instead:

EntityPlayerMP.class.isInstance(entity)

(and the same thing for any other code referencing the EntityPlayerMP.class).

commented

Hey radfast!

The problem with the instanceof check is that the code is meant to block FakePlayers, not Galacticraft users etc. Because many mods do not use the Forge FakePlayer class (I have no clue as to why, but alas), I had to do some hack-ish methods to fix it. The thing is, it has been fixed in my Beta builds for a while, and no one seems to bother to check those before posting! :D

Sorry you had to deal with a bunch of people thinking it was your fault!

commented

Hey @WayofTime and that's really no problem, I'm just glad we can tick this issue off the list.

I looked at SpellHelper.FakePlayer and I see you made a special check for "GC" named classes, thank you very much for that compatibility. We on our side will make sure not to change that class name now (or if there ever comes a time when there is an overwhelming reason to change it we'll be sure to let you know). I think the only GC classes which other mod's code will encounter here are GCEntityPlayerMP (or GCEntityClientPlayerMP on a client) https://github.com/micdoodle8/Galacticraft/tree/master/src/main/java/micdoodle8/mods/galacticraft/core/entities/player - and as I mentioned, they won't always be used, Galacticraft auto-switches to using the PlayerAPI approach instead if that is installed (but we don't require PlayerAPI to be installed).

commented

It's weird. The person I am talking to says that with and without PlayerAPI it is not working... The only places that isFakePlayer would return true is if your username contains "[CoFH]" or you are an instanceof a FakePlayer. Neither of which seem to be the case.

Between your previous version and this version, there were no real bomb-shell changes on either of our classes. Unless you somehow are a FakePlayer (no clue how that would happen, but It is possible), it just seems like it wanted to crap out.

Someone is having an issue with my latest build (Beta18) and your latest mod, and I am talking to them in my IRC channel now. I'll let you know if we make any progress, but for now it does appear to be broken.

commented

Some players "think" they have our latest build but actually they don't - the latest is 3.0.2.194 from here http://ci.micdoodle8.com/job/Galacticraft-1.7/ - all three files including MicdoodleCore are needed to have Galacticraft work properly with PlayerAPI.

Like you say, your FakePlayer code seems perfect, seems like that should definitely return false for GCEntityPlayerMP so that ought to cover every build with and without PlayerAPI.

commented

though looking at SpellHelper.isFakePlayer again, i wondered if the final line should be

return true;

commented

Probably so, probably not - I think I kept return false; there so that I could add other true cases to it later. Doesn't change the issue, but I'll let the person know.

commented

Glad to see it's not just me.