Added the Forestry API

This commit is contained in:
WayofTime 2015-05-11 13:12:56 -04:00
parent 69aeb4a813
commit 2cc9d3a53a
202 changed files with 7108 additions and 35 deletions

View file

@ -17,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemIncense extends Item implements IIncense
{
private static final String[] ITEM_NAMES = new String[]{"Woodash"};
private static final String[] ITEM_NAMES = new String[]{"Woodash", "Cloves"};
@SideOnly(Side.CLIENT)
private IIcon[] icons;
@ -80,12 +80,26 @@ public class ItemIncense extends Item implements IIncense
@Override
public int getMinLevel(ItemStack stack)
{
switch(stack.getItemDamage())
{
case 0:
return 0;
case 1:
return 200;
}
return 0;
}
@Override
public int getMaxLevel(ItemStack stack)
{
switch(stack.getItemDamage())
{
case 0:
return 200;
case 1:
return 500;
}
return 100;
}
@ -98,6 +112,13 @@ public class ItemIncense extends Item implements IIncense
@Override
public float getTickRate(ItemStack stack)
{
switch(stack.getItemDamage())
{
case 0:
return 1.0f;
case 1:
return 0.5f;
}
return 1.0f;
}

View file

@ -328,7 +328,10 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
}
NBTTagCompound locTag = (NBTTagCompound)tag.getTag("location");
locTag.setBoolean("isStored", false);
if(locTag != null)
{
locTag.setBoolean("isStored", false);
}
}
public Int3 getStoredLocation(ItemStack stack)

View file

@ -91,11 +91,11 @@ public class SacrificialDagger extends Item
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
// if (this.canUseForSacrifice(stack))
// {
// player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
// return stack;
// }
if (this.canUseForSacrifice(stack))
{
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
return stack;
}
if (!player.capabilities.isCreativeMode)
{
@ -183,6 +183,11 @@ public class SacrificialDagger extends Item
for (int k = -2; k <= 1; k++)
{
tileEntity = world.getTileEntity(i + x, k + y, j + z);
if(tileEntity instanceof IBloodAltar)
{
return (IBloodAltar)tileEntity;
}
}
}
}

View file

@ -1,5 +1,18 @@
package WayofTime.alchemicalWizardry.common.items.sigil;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
@ -10,21 +23,6 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.List;
public class DivinationSigil extends Item implements ArmourUpgrade, IReagentManipulator, IBindable
{
@ -130,7 +128,7 @@ public class DivinationSigil extends Item implements ArmourUpgrade, IReagentMani
@Override
public boolean isUpgrade()
{
return true;
return false;
}
@Override