Massive rework of configs, items and blocks.
I redone where the items/blocsks are stored and how the configs are handled to clean up it and give space. You can change the config line to AWWayofTime if you want to keep the compatibility with old configs. Now you reference the blocks from the ModBlocks and Items from the ModItems.
This commit is contained in:
parent
8601e9faff
commit
e3644f2d2b
304 changed files with 3941 additions and 5108 deletions
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -11,14 +14,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade {
|
||||
private static Icon activeIcon;
|
||||
private static Icon passiveIcon;
|
||||
private int tickDelay = 300;
|
||||
|
@ -44,8 +43,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -76,8 +74,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -90,8 +87,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -135,14 +131,13 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % tickDelay);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
|
@ -158,7 +153,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -169,13 +164,13 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3Entity, getEnergyUsed());
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed());
|
||||
}
|
||||
|
||||
int range = 5;
|
||||
int verticalRange = 5;
|
||||
float posX = Math.round(par3Entity.posX);
|
||||
float posY = (float)(par3Entity.posY - par3Entity.getEyeHeight());
|
||||
float posY = (float) (par3Entity.posY - par3Entity.getEyeHeight());
|
||||
float posZ = Math.round(par3Entity.posZ);
|
||||
List<EntityItem> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range));
|
||||
|
||||
|
@ -197,7 +192,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
int range = 5;
|
||||
int verticalRange = 5;
|
||||
float posX = Math.round(player.posX);
|
||||
float posY = (float)(player.posY - player.getEyeHeight());
|
||||
float posY = (float) (player.posY - player.getEyeHeight());
|
||||
float posZ = Math.round(player.posZ);
|
||||
List<EntityItem> entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue