Astral Sorcery

Astral Sorcery

63M Downloads

Crash with Wings mod installed.

SirAron111 opened this issue · 4 comments

commented

Crash with Wings mod installed.

Wings 1.1.5 for Minecraft 1.12.2
MC 1.12.2
Forge 14.23.5.2838
AstralSorcery-1.12.2-1.10.19.jar

https://pastebin.com/FB3D2XN3

pau101/Wings#39 more info here

commented

What is the amulet "FogDad" is wearing have on it? And is he using anything from the Wings mod?

commented

Don’t know exactly will have him tell me once he is back. Or send him here directly so he can provide the information as this one happened to him.

commented

Hey, Wings dev here.

I have looked into this a bit and I believe I have some suspect code:

static EntityPlayer getPlayerHavingTool(ItemStack anyTool) {
UUID plUUID = getWornPlayerUUID(anyTool);
if(plUUID == null) return null;
EntityPlayer player;
if(FMLCommonHandler.instance().getSide() == Side.CLIENT) {
player = resolvePlayerClient(plUUID);
} else {
MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
if(server == null) return null;
player = server.getPlayerList().getPlayerByUUID(plUUID);
}

The FMLCommonHandler.instance().getSide() statement returns the physical side, not logical. As such when this function is called on the integrated server it will access the main thread/logical client's player instance and not the server's. This is the cause of the CME, the code can be corrected to use FMLCommonHandler.instance().getEffectiveSide().

commented

Well, if you're that dead set on this being the issue, i call it fixed then.