Added Harvest Goddess Sigil, fixed Water and Lava sigils so they actually place their fluids (derp)
This commit is contained in:
parent
ad3289d080
commit
b3199cfb19
|
@ -66,6 +66,7 @@ import WayofTime.alchemicalWizardry.common.items.sigil.AirSigil;
|
||||||
import WayofTime.alchemicalWizardry.common.items.sigil.DivinationSigil;
|
import WayofTime.alchemicalWizardry.common.items.sigil.DivinationSigil;
|
||||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemBloodLightSigil;
|
import WayofTime.alchemicalWizardry.common.items.sigil.ItemBloodLightSigil;
|
||||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemFluidSigil;
|
import WayofTime.alchemicalWizardry.common.items.sigil.ItemFluidSigil;
|
||||||
|
import WayofTime.alchemicalWizardry.common.items.sigil.ItemHarvestSigil;
|
||||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSeerSigil;
|
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSeerSigil;
|
||||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSigilOfEnderSeverance;
|
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSigilOfEnderSeverance;
|
||||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSigilOfSupression;
|
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSigilOfSupression;
|
||||||
|
@ -193,6 +194,7 @@ public class ModItems
|
||||||
public static Item itemDestinationClearer;
|
public static Item itemDestinationClearer;
|
||||||
|
|
||||||
public static Item itemBloodMagicBook;
|
public static Item itemBloodMagicBook;
|
||||||
|
public static Item itemHarvestSigil;
|
||||||
|
|
||||||
public static Item bucketLife;
|
public static Item bucketLife;
|
||||||
|
|
||||||
|
@ -296,6 +298,7 @@ public class ModItems
|
||||||
itemBloodMagicBook = new ItemBMBook().setUnlocalizedName("bmBook");
|
itemBloodMagicBook = new ItemBMBook().setUnlocalizedName("bmBook");
|
||||||
|
|
||||||
itemBloodPack = new ItemBloodLetterPack().setUnlocalizedName("itemBloodPack");
|
itemBloodPack = new ItemBloodLetterPack().setUnlocalizedName("itemBloodPack");
|
||||||
|
itemHarvestSigil = new ItemHarvestSigil().setUnlocalizedName("itemHarvestSigil");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerItems()
|
public static void registerItems()
|
||||||
|
@ -400,6 +403,7 @@ public class ModItems
|
||||||
GameRegistry.registerItem(ModItems.baseAlchemyItems, "bloodMagicBaseAlchemyItems");
|
GameRegistry.registerItem(ModItems.baseAlchemyItems, "bloodMagicBaseAlchemyItems");
|
||||||
|
|
||||||
GameRegistry.registerItem(ModItems.itemBloodPack, "itemBloodPack");
|
GameRegistry.registerItem(ModItems.itemBloodPack, "itemBloodPack");
|
||||||
|
GameRegistry.registerItem(ModItems.itemHarvestSigil, "itemHarvestSigil");
|
||||||
//GameRegistry.registerItem(ModItems.itemBloodFrame, "itemBloodFrame");
|
//GameRegistry.registerItem(ModItems.itemBloodFrame, "itemBloodFrame");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
||||||
|
|
||||||
public class ItemComponents extends Item
|
public class ItemComponents extends Item
|
||||||
{
|
{
|
||||||
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore", "MeleeCore", "ParadigmBackPlate", "OutputCable", "FlameCore", "IcyCore", "GustCore", "EarthenCore", "InputCable", "CrackedRunicPlate", "RunicPlate", "ScribedRunicPlate", "DefaultCore", "OffensiveCore", "DefensiveCore", "EnvironmentalCore", "PowerCore", "CostCore", "PotencyCore", "ObsidianBrace", "ToolCore"};
|
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore", "MeleeCore", "ParadigmBackPlate", "OutputCable", "FlameCore", "IcyCore", "GustCore", "EarthenCore", "InputCable", "CrackedRunicPlate", "RunicPlate", "ScribedRunicPlate", "DefaultCore", "OffensiveCore", "DefensiveCore", "EnvironmentalCore", "PowerCore", "CostCore", "PotencyCore", "ObsidianBrace", "ToolCore", "EtherealSlate"};
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon[] icons;
|
private IIcon[] icons;
|
||||||
|
|
|
@ -0,0 +1,215 @@
|
||||||
|
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||||
|
import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry;
|
||||||
|
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||||
|
import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding;
|
||||||
|
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
public class ItemHarvestSigil extends EnergyItems implements IHolding, ArmourUpgrade
|
||||||
|
{
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
private static IIcon activeIcon;
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
private static IIcon passiveIcon;
|
||||||
|
|
||||||
|
public ItemHarvestSigil()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
this.maxStackSize = 1;
|
||||||
|
setEnergyUsed(500);
|
||||||
|
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||||
|
{
|
||||||
|
par3List.add("You sow what you reap");
|
||||||
|
|
||||||
|
if (!(par1ItemStack.stackTagCompound == null))
|
||||||
|
{
|
||||||
|
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||||
|
{
|
||||||
|
par3List.add("Activated");
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
par3List.add("Deactivated");
|
||||||
|
}
|
||||||
|
|
||||||
|
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconRegister)
|
||||||
|
{
|
||||||
|
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_deactivated");
|
||||||
|
this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_activated");
|
||||||
|
this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_deactivated");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||||
|
{
|
||||||
|
if (stack.stackTagCompound == null)
|
||||||
|
{
|
||||||
|
stack.setTagCompound(new NBTTagCompound());
|
||||||
|
}
|
||||||
|
|
||||||
|
NBTTagCompound tag = stack.stackTagCompound;
|
||||||
|
|
||||||
|
if (tag.getBoolean("isActive"))
|
||||||
|
{
|
||||||
|
return this.activeIcon;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
return this.passiveIcon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIconFromDamage(int par1)
|
||||||
|
{
|
||||||
|
if (par1 == 1)
|
||||||
|
{
|
||||||
|
return this.activeIcon;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
return this.passiveIcon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||||
|
{
|
||||||
|
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||||
|
|
||||||
|
if (par3EntityPlayer.isSneaking())
|
||||||
|
{
|
||||||
|
return par1ItemStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (par1ItemStack.stackTagCompound == null)
|
||||||
|
{
|
||||||
|
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||||
|
}
|
||||||
|
|
||||||
|
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||||
|
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||||
|
|
||||||
|
if (tag.getBoolean("isActive"))
|
||||||
|
{
|
||||||
|
par1ItemStack.setItemDamage(1);
|
||||||
|
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||||
|
|
||||||
|
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||||
|
{
|
||||||
|
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||||
|
{
|
||||||
|
tag.setBoolean("isActive", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return par1ItemStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
|
||||||
|
{
|
||||||
|
if (!(par3Entity instanceof EntityPlayer) || par2World.isRemote)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||||
|
|
||||||
|
if (par1ItemStack.stackTagCompound == null)
|
||||||
|
{
|
||||||
|
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||||
|
{
|
||||||
|
int range = 3;
|
||||||
|
int verticalRange = 1;
|
||||||
|
int posX = (int) Math.round(par3Entity.posX - 0.5f);
|
||||||
|
int posY = (int) par3Entity.posY;
|
||||||
|
int posZ = (int) Math.round(par3Entity.posZ - 0.5f);
|
||||||
|
|
||||||
|
for (int ix = posX - range; ix <= posX + range; ix++)
|
||||||
|
{
|
||||||
|
for (int iz = posZ - range; iz <= posZ + range; iz++)
|
||||||
|
{
|
||||||
|
for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++)
|
||||||
|
{
|
||||||
|
HarvestRegistry.harvestBlock(par2World, ix, iy, iz);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||||
|
{
|
||||||
|
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||||
|
{
|
||||||
|
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||||
|
{
|
||||||
|
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||||
|
{
|
||||||
|
int range = 3;
|
||||||
|
int verticalRange = 1;
|
||||||
|
int posX = (int) Math.round(player.posX - 0.5f);
|
||||||
|
int posY = (int) player.posY;
|
||||||
|
int posZ = (int) Math.round(player.posZ - 0.5f);
|
||||||
|
|
||||||
|
for (int ix = posX - range; ix <= posX + range; ix++)
|
||||||
|
{
|
||||||
|
for (int iz = posZ - range; iz <= posZ + range; iz++)
|
||||||
|
{
|
||||||
|
for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++)
|
||||||
|
{
|
||||||
|
HarvestRegistry.harvestBlock(world, ix, iy, iz);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isUpgrade() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getEnergyForTenSeconds()
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return 500;
|
||||||
|
}
|
||||||
|
}
|
|
@ -152,7 +152,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
||||||
return par1ItemStack;
|
return par1ItemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.canPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k) && !EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
if(this.canPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k) && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||||
{
|
{
|
||||||
this.tryPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k);
|
this.tryPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k);
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
|
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
|
||||||
{
|
{
|
||||||
if (!(par3Entity instanceof EntityPlayer))
|
if (!(par3Entity instanceof EntityPlayer) || par2World.isRemote)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
||||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int range = 5;
|
int range = 3;
|
||||||
int verticalRange = 2;
|
int verticalRange = 2;
|
||||||
int posX = (int) Math.round(par3Entity.posX - 0.5f);
|
int posX = (int) Math.round(par3Entity.posX - 0.5f);
|
||||||
int posY = (int) par3Entity.posY;
|
int posY = (int) par3Entity.posY;
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
||||||
return par1ItemStack;
|
return par1ItemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.canPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k) && !EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
if(this.canPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k) && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||||
{
|
{
|
||||||
this.tryPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k);
|
this.tryPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k);
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,7 @@ item.bloodMagicBaseItem.PowerCore.name=Power Core
|
||||||
item.bloodMagicBaseItem.CostCore.name=Reduction Core
|
item.bloodMagicBaseItem.CostCore.name=Reduction Core
|
||||||
item.bloodMagicBaseItem.PotencyCore.name=Potency Core
|
item.bloodMagicBaseItem.PotencyCore.name=Potency Core
|
||||||
item.bloodMagicBaseItem.ObsidianBrace.name=Obsidian Brace
|
item.bloodMagicBaseItem.ObsidianBrace.name=Obsidian Brace
|
||||||
|
item.bloodMagicBaseItem.EtherealSlate.name=Ethereal Slate
|
||||||
item.bloodMagicAlchemyItem.Offensa.name=Offensa
|
item.bloodMagicAlchemyItem.Offensa.name=Offensa
|
||||||
item.bloodMagicAlchemyItem.Praesidium.name=Praesidium
|
item.bloodMagicAlchemyItem.Praesidium.name=Praesidium
|
||||||
item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae
|
item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae
|
||||||
|
@ -186,6 +187,7 @@ item.destinationClearer.name=Alchemic Cleanser
|
||||||
item.demonPlacer.name=Demon Crystal
|
item.demonPlacer.name=Demon Crystal
|
||||||
item.creativeDagger.name=Creative Sacrificial Knife
|
item.creativeDagger.name=Creative Sacrificial Knife
|
||||||
item.itemBloodPack.name=Blood Letter's Pack
|
item.itemBloodPack.name=Blood Letter's Pack
|
||||||
|
item.itemHarvestSigil.name=Harvest Goddess Sigil
|
||||||
#Creative Tab
|
#Creative Tab
|
||||||
itemGroup.tabBloodMagic=Blood Magic
|
itemGroup.tabBloodMagic=Blood Magic
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 584 B |
Binary file not shown.
After Width: | Height: | Size: 616 B |
Binary file not shown.
After Width: | Height: | Size: 622 B |
Loading…
Reference in a new issue