Getting more spell stuff done

This commit is contained in:
WayofTime 2014-03-07 07:02:18 -05:00
parent 9d9d376e4a
commit b34ff3c58e
78 changed files with 1133 additions and 159 deletions

View file

@ -5,12 +5,15 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.FakePlayer;
import net.minecraftforge.common.ForgeDirection;
public class SpellHelper
@ -105,4 +108,30 @@ public class SpellHelper
world.setBlock(posX, posY, posZ, Block.ice.blockID);
}
}
public static boolean isFakePlayer(World world, EntityPlayer player)
{
if(world.isRemote)
{
return false;
}
if(player instanceof FakePlayer)
{
return true;
}
String str = player.getClass().getCanonicalName();
if(str.contains("GCEntityPlayerMP"))
{
return false;
}
if(player.getClass().equals(EntityPlayerMP.class))
{
return false;
}
return true;
}
}