Added some rudimentary path blocks for the tranquility altar - textures pending.
This commit is contained in:
parent
f4d0b18521
commit
cc1e11f09f
17 changed files with 216 additions and 23 deletions
|
@ -12,6 +12,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
@ -24,6 +25,20 @@ import net.minecraftforge.fluids.IFluidBlock;
|
|||
|
||||
public class Utils
|
||||
{
|
||||
public static NBTTagCompound getPersistentDataTag(EntityPlayer player)
|
||||
{
|
||||
NBTTagCompound forgeData = player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG);
|
||||
NBTTagCompound beaconData = forgeData.getCompoundTag("BloodMagic");
|
||||
|
||||
//Creates/sets the tags if they don't exist
|
||||
if (!forgeData.hasKey("BloodMagic"))
|
||||
forgeData.setTag("BloodMagic", beaconData);
|
||||
if (!player.getEntityData().hasKey(EntityPlayer.PERSISTED_NBT_TAG))
|
||||
player.getEntityData().setTag(EntityPlayer.PERSISTED_NBT_TAG, forgeData);
|
||||
|
||||
return beaconData;
|
||||
}
|
||||
|
||||
public static boolean isInteger(String integer)
|
||||
{
|
||||
try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue