Initial 1.9 commit

This DOES NOT BUILD. Do not even attempt.

Almost everything has been ported besides the block/item packages. Then it's a matter of testing what broke.
This commit is contained in:
Nick 2016-03-17 13:00:44 -07:00
parent f896383fe6
commit 6c729db70c
359 changed files with 1858 additions and 4447 deletions

View file

@ -1,14 +1,14 @@
package WayofTime.bloodmagic.api.util.helper;
import java.util.UUID;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.event.ItemBindEvent;
import WayofTime.bloodmagic.api.iface.IBindable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.event.ItemBindEvent;
import WayofTime.bloodmagic.api.iface.IBindable;
import java.util.UUID;
public class BindableHelper
{

View file

@ -1,8 +1,8 @@
package WayofTime.bloodmagic.api.util.helper;
import WayofTime.bloodmagic.api.Constants;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import WayofTime.bloodmagic.api.Constants;
public class IncenseHelper
{

View file

@ -1,10 +1,9 @@
package WayofTime.bloodmagic.api.util.helper;
import WayofTime.bloodmagic.api.BloodMagicAPI;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import WayofTime.bloodmagic.api.BloodMagicAPI;
public class LogHelper
{
private Logger logger;

View file

@ -1,23 +1,23 @@
package WayofTime.bloodmagic.api.util.helper;
import java.util.UUID;
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 WayofTime.bloodmagic.api.orb.IBloodOrb;
import WayofTime.bloodmagic.api.registry.OrbRegistry;
import com.google.common.base.Strings;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
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 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 com.google.common.base.Strings;
import java.util.UUID;
public class NetworkHelper
{
@ -271,10 +271,10 @@ public class NetworkHelper
@Deprecated
public static int syphonFromNetwork(String ownerName, int syphon)
{
if (MinecraftServer.getServer() == null)
if (FMLCommonHandler.instance().getMinecraftServerInstance() == null)
return 0;
World world = MinecraftServer.getServer().worldServers[0];
World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServers[0];
SoulNetwork network = (SoulNetwork) world.loadItemData(SoulNetwork.class, ownerName);
if (network == null)
@ -308,10 +308,10 @@ public class NetworkHelper
if (MinecraftForge.EVENT_BUS.post(event))
return 0;
if (MinecraftServer.getServer() == null)
if (FMLCommonHandler.instance().getMinecraftServerInstance() == null)
return 0;
World world = MinecraftServer.getServer().worldServers[0];
World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServers[0];
SoulNetwork data = (SoulNetwork) world.loadItemData(SoulNetwork.class, event.ownerNetwork);
if (data == null)
@ -337,10 +337,10 @@ public class NetworkHelper
@Deprecated
public static int getCurrentEssence(String ownerName)
{
if (MinecraftServer.getServer() == null)
if (FMLCommonHandler.instance().getMinecraftServerInstance() == null)
return 0;
World world = MinecraftServer.getServer().worldServers[0];
World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServers[0];
SoulNetwork network = (SoulNetwork) world.loadItemData(SoulNetwork.class, ownerName);
if (network == null)

View file

@ -1,8 +1,8 @@
package WayofTime.bloodmagic.api.util.helper;
import java.util.ArrayList;
import java.util.UUID;
import WayofTime.bloodmagic.api.Constants;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
@ -12,10 +12,9 @@ import net.minecraftforge.common.UsernameCache;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.relauncher.Side;
import WayofTime.bloodmagic.api.Constants;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.UUID;
public class PlayerHelper
{
@ -36,7 +35,7 @@ public class PlayerHelper
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
return null;
return MinecraftServer.getServer().getConfigurationManager().getPlayerByUsername(username);
return FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerByUsername(username);
}
public static EntityPlayer getPlayerFromUUID(String uuid)
@ -94,6 +93,6 @@ public class PlayerHelper
if (player == null)
return;
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
player.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("confusion"), 80));
}
}

View file

@ -1,12 +1,13 @@
package WayofTime.bloodmagic.api.util.helper;
import WayofTime.bloodmagic.api.altar.IBloodAltar;
import WayofTime.bloodmagic.registry.ModPotions;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import WayofTime.bloodmagic.api.altar.IBloodAltar;
public class PlayerSacrificeHelper
{
@ -63,7 +64,7 @@ public class PlayerSacrificeHelper
{
player.setHealth(maxHealth / 10.0f);
setPlayerIncense(player, 0);
player.addPotionEffect(new PotionEffect(soulFrayId.id, soulFrayDuration));
player.addPotionEffect(new PotionEffect(ModPotions.soulFray, soulFrayDuration));
return true;
}

View file

@ -1,19 +1,19 @@
package WayofTime.bloodmagic.api.util.helper;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import WayofTime.bloodmagic.api.registry.RitualRegistry;
import WayofTime.bloodmagic.api.ritual.EnumRuneType;
import WayofTime.bloodmagic.api.ritual.IRitualStone;
import WayofTime.bloodmagic.api.ritual.Ritual;
import WayofTime.bloodmagic.api.ritual.RitualComponent;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import java.util.ArrayList;
public class RitualHelper
{