Added the Forestry API
This commit is contained in:
parent
69aeb4a813
commit
2cc9d3a53a
202 changed files with 7108 additions and 35 deletions
|
@ -1397,7 +1397,7 @@ public class AlchemicalWizardry
|
|||
Rituals.registerRitual("AW010Crusher", 1, 2500, new RitualEffectCrushing(), "Ritual of the Crusher", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW011Speed", 1, 1000, new RitualEffectLeap(), "Ritual of Speed", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW012AnimalGrowth", 1, 10000, new RitualEffectAnimalGrowth(), "Ritual of the Shepherd", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW013Suffering", 1, 50000, new RitualEffectWellOfSuffering(), "Well of Suffering", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleSuffering.png"), 0, 0, 0, 255, 0, 0.501, 0.8, 0, 2.5, true));
|
||||
Rituals.registerRitual("AW013Suffering", 1, 50000, new RitualEffectWellOfSuffering(), "Well of Suffering", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/AlchemyArrays/WellOfSufferingArray.png"), 0, 0, 0, 255, 0, 0.501, 0.8, 0, 2.5, true));
|
||||
Rituals.registerRitual("AW014Regen", 1, 25000, new RitualEffectHealing(), "Ritual of Regeneration", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW015FeatheredKnife", 1, 50000, new RitualEffectFeatheredKnife(), "Ritual of the Feathered Knife", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW016FeatheredEarth", 2, 100000, new RitualEffectFeatheredEarth(), "Ritual of the Feathered Earth", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
|
|
|
@ -166,11 +166,11 @@ public class BloodMagicConfiguration
|
|||
|
||||
BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true);
|
||||
|
||||
ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt();
|
||||
ItemIncense.minValue = config.get("TestIncenseSettings", "MinValue", 0).getInt();
|
||||
ItemIncense.maxValue = config.get("TestIncenseSettings", "MaxValue", 100).getInt();
|
||||
PlayerSacrificeHandler.scalingOfSacrifice = (float) config.get("TestIncenseSettings", "ScalingFactor", 0.0025f).getDouble();
|
||||
PlayerSacrificeHandler.soulFrayDuration = config.get("TestIncenseSettings", "SoulFrayDuration", 400).getInt();
|
||||
// ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt();
|
||||
// ItemIncense.minValue = config.get("TestIncenseSettings", "MinValue", 0).getInt();
|
||||
// ItemIncense.maxValue = config.get("TestIncenseSettings", "MaxValue", 100).getInt();
|
||||
// PlayerSacrificeHandler.scalingOfSacrifice = (float) config.get("TestIncenseSettings", "ScalingFactor", 0.0025f).getDouble();
|
||||
// PlayerSacrificeHandler.soulFrayDuration = config.get("TestIncenseSettings", "SoulFrayDuration", 400).getInt();
|
||||
|
||||
|
||||
Side side = FMLCommonHandler.instance().getSide();
|
||||
|
|
|
@ -10,7 +10,7 @@ import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
|||
|
||||
public class PlayerSacrificeHandler
|
||||
{
|
||||
public static float scalingOfSacrifice = 0.0025f;
|
||||
public static float scalingOfSacrifice = 0.001f;
|
||||
public static int soulFrayDuration = 400;
|
||||
public static float getPlayerIncense(EntityPlayer player)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ public class PlayerSacrificeHandler
|
|||
APISpellHelper.setCurrentIncense(player, amount);
|
||||
}
|
||||
|
||||
public static boolean incrementIncense(EntityPlayer player, float min, float max)
|
||||
public static boolean incrementIncense(EntityPlayer player, float min, float max, float increment)
|
||||
{
|
||||
float amount = getPlayerIncense(player);
|
||||
if(amount < min || amount >= max)
|
||||
|
@ -30,7 +30,7 @@ public class PlayerSacrificeHandler
|
|||
return false;
|
||||
}
|
||||
|
||||
amount++;
|
||||
amount = amount + Math.max(increment, max - amount);
|
||||
setPlayerIncense(player, amount);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -23,6 +23,7 @@ public class TECrucible extends TEInventory
|
|||
public int ticksRemaining = 0;
|
||||
public int minValue = 0;
|
||||
public int maxValue = 0;
|
||||
public float incrementValue = 0;
|
||||
|
||||
public int state = 0; //0 is when it gives off gray particles, 1 is when it gives off white particles (player can't use this incense anymore), 2 is the normal colour of the incense, 3 means no particles (it is out)
|
||||
|
||||
|
@ -59,6 +60,8 @@ public class TECrucible extends TEInventory
|
|||
minValue = incense.getMinLevel(stack);
|
||||
maxValue = incense.getMaxLevel(stack);
|
||||
|
||||
incrementValue = incense.getTickRate(stack);
|
||||
|
||||
stack.stackSize--;
|
||||
if(stack.stackSize <= 0)
|
||||
{
|
||||
|
@ -78,7 +81,7 @@ public class TECrucible extends TEInventory
|
|||
|
||||
for(EntityPlayer player : playerList)
|
||||
{
|
||||
if(ticksRemaining > 0 && PlayerSacrificeHandler.incrementIncense(player, minValue, maxValue))
|
||||
if(ticksRemaining > 0 && PlayerSacrificeHandler.incrementIncense(player, minValue, maxValue, incrementValue))
|
||||
{
|
||||
ticksRemaining--;
|
||||
if(state != 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue