Reorganized fix for the Lava Crystal

This commit is contained in:
WayofTime 2016-01-05 10:41:23 -05:00
parent fbaf5de9ab
commit f4abee84ef
2 changed files with 15 additions and 16 deletions

View file

@ -1,12 +1,6 @@
package WayofTime.bloodmagic.api.util.helper; package WayofTime.bloodmagic.api.util.helper;
import WayofTime.bloodmagic.api.BloodMagicAPI; import java.util.UUID;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.event.AddToNetworkEvent;
import WayofTime.bloodmagic.api.event.SoulNetworkEvent;
import WayofTime.bloodmagic.api.network.SoulNetwork;
import com.google.common.base.Strings;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -14,11 +8,14 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.eventhandler.Event; 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;
import WayofTime.bloodmagic.api.event.SoulNetworkEvent;
import WayofTime.bloodmagic.api.network.SoulNetwork;
import java.util.UUID; import com.google.common.base.Strings;
public class NetworkHelper public class NetworkHelper
{ {
@ -34,11 +31,6 @@ public class NetworkHelper
*/ */
public static SoulNetwork getSoulNetwork(String name) public static SoulNetwork getSoulNetwork(String name)
{ {
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
{
return null;
}
World world = DimensionManager.getWorld(0); World world = DimensionManager.getWorld(0);
SoulNetwork network = (SoulNetwork) world.getMapStorage().loadData(SoulNetwork.class, name); SoulNetwork network = (SoulNetwork) world.getMapStorage().loadData(SoulNetwork.class, name);

View file

@ -1,12 +1,15 @@
package WayofTime.bloodmagic.item; package WayofTime.bloodmagic.item;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.IFuelHandler; import net.minecraftforge.fml.common.IFuelHandler;
import net.minecraftforge.fml.relauncher.Side;
import WayofTime.bloodmagic.api.Constants; import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.util.helper.PlayerHelper; import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
@ -47,7 +50,11 @@ public class ItemLavaCrystal extends ItemBindable implements IFuelHandler
if (fuelItem instanceof ItemLavaCrystal) if (fuelItem instanceof ItemLavaCrystal)
{ {
// if(true) if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
{
return 200;
}
if (canSyphonFromNetwork(fuel, getLPUsed())) if (canSyphonFromNetwork(fuel, getLPUsed()))
{ {
return 200; return 200;