mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 15:23:06 +00:00
Finished TileEntities
This commit is contained in:
1 parent
cfed9f5ab3
commit
b2f7ec6030
36 files changed
+183
-233
No files matched your search
@@ -11,6 +11,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EnergyItems extends Item implements IBindable
|
||||
@@ -47,7 +48,7 @@ public class EnergyItems extends Item implements IBindable
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
for (int l = 0; l < 8; ++l)
|
||||
{
|
||||
world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < damage; i++)
|
||||
@@ -115,6 +116,7 @@ public class EnergyItems extends Item implements IBindable
|
||||
return false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone)
|
||||
{
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals("")))
|
||||
@@ -173,6 +175,7 @@ public class EnergyItems extends Item implements IBindable
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean syphonAndDamageWhileInContainer(ItemStack ist, EntityPlayer player, int damageToBeDone)
|
||||
{
|
||||
if (!syphonWhileInContainer(ist, damageToBeDone))
|
||||
@@ -222,35 +225,6 @@ public class EnergyItems extends Item implements IBindable
|
||||
return item.getTagCompound().getString("ownerName");
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void drainPlayerNetwork(EntityPlayer player, int damageToBeDone)
|
||||
{
|
||||
String ownerName = SpellHelper.getUsername(player);
|
||||
|
||||
if (MinecraftServer.getServer() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
data = new LifeEssenceNetwork(ownerName);
|
||||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
if (data.currentEssence >= damageToBeDone)
|
||||
{
|
||||
data.currentEssence -= damageToBeDone;
|
||||
data.markDirty();
|
||||
} else
|
||||
{
|
||||
hurtPlayer(player, damageToBeDone);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static int getCurrentEssence(String ownerName)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user