Fixed crash when activating rituals on servers.
This commit is contained in:
parent
c8ded3c6dd
commit
de08e5d0ac
2 changed files with 13 additions and 0 deletions
|
@ -8,7 +8,9 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.event.AddToNetworkEvent;
|
||||
|
@ -31,6 +33,11 @@ public class NetworkHelper
|
|||
*/
|
||||
public static SoulNetwork getSoulNetwork(String name)
|
||||
{
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
|
||||
{
|
||||
return new SoulNetwork(name);
|
||||
}
|
||||
|
||||
World world = DimensionManager.getWorld(0);
|
||||
SoulNetwork network = (SoulNetwork) world.getMapStorage().loadData(SoulNetwork.class, name);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue