Reorganized github - Renamed packages lowercase
This commit is contained in:
parent
5a3a6d4a8e
commit
579ddee7f0
362 changed files with 5163 additions and 8935 deletions
|
|
@ -1,95 +1,72 @@
|
|||
package MysticWorld.Items;
|
||||
package mysticworld.items;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import MysticWorld.MysticWorld;
|
||||
import MysticWorld.Entity.EntityChargeAir;
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemVoidShard extends Item {
|
||||
|
||||
public ItemVoidShard(int id) {
|
||||
super(id);
|
||||
this.setMaxStackSize(1);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
this.setMaxDamage(1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean par4) {
|
||||
if (itemStack.stackTagCompound == null)
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
list.add("Experience Stored: " + Integer.toString(itemStack.stackTagCompound.getInteger("xpStored")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack itemStack) {
|
||||
if (itemStack.stackTagCompound == null)
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
if (itemStack.stackTagCompound.hasKey("filled")) {
|
||||
return itemStack.stackTagCompound.getBoolean("filled");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
|
||||
if (itemStack.stackTagCompound == null)
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
int experience = entityPlayer.experienceLevel;
|
||||
int experienceSubtract = entityPlayer.experienceLevel - 30;
|
||||
|
||||
if (itemStack.stackTagCompound.getBoolean("filled") == false)
|
||||
{
|
||||
if (experience > 0 && experience <= 30)
|
||||
{
|
||||
if (itemStack.stackTagCompound.getBoolean("filled") == false) {
|
||||
if (experience > 0 && experience <= 30) {
|
||||
entityPlayer.experienceLevel = 0;
|
||||
itemStack.stackTagCompound.setInteger("xpStored", experience);
|
||||
itemStack.stackTagCompound.setBoolean("filled", true);
|
||||
}
|
||||
else if (experience > 30)
|
||||
{
|
||||
} else if (experience > 30) {
|
||||
entityPlayer.experienceLevel = experienceSubtract;
|
||||
itemStack.stackTagCompound.setInteger("xpStored", 30);
|
||||
itemStack.stackTagCompound.setBoolean("filled", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
entityPlayer.experienceLevel += itemStack.stackTagCompound.getInteger("xpStored");
|
||||
itemStack.stackTagCompound.setInteger("xpStored", 0);
|
||||
itemStack.stackTagCompound.setBoolean("filled", false);
|
||||
itemStack.damageItem(2, entityPlayer);
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean par4)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
|
||||
list.add("Experience Stored: " + Integer.toString(itemStack.stackTagCompound.getInteger("xpStored")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack itemStack)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
|
||||
if (itemStack.stackTagCompound.hasKey("filled"))
|
||||
{
|
||||
return itemStack.stackTagCompound.getBoolean("filled");
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
itemIcon = iconRegister.registerIcon("MysticMods:ShardVoid");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
itemIcon = iconRegister.registerIcon("MysticMods:ShardVoid");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue