2012-06-05 14:14:20 +02:00
|
|
|
package ee3.item;
|
|
|
|
|
2012-06-22 22:01:15 +02:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import net.minecraft.src.EntityPlayer;
|
2012-06-05 14:14:20 +02:00
|
|
|
import net.minecraft.src.EnumRarity;
|
|
|
|
import net.minecraft.src.ItemStack;
|
2012-06-22 22:01:15 +02:00
|
|
|
import net.minecraft.src.World;
|
2012-06-26 22:20:06 +02:00
|
|
|
import ee3.core.mod_EE3;
|
2012-06-27 22:10:09 +02:00
|
|
|
import ee3.core.helper.Helper;
|
2012-06-29 21:46:39 +02:00
|
|
|
import ee3.core.helper.TransmutationHelper;
|
2012-06-15 22:05:30 +02:00
|
|
|
import ee3.core.interfaces.ITransmuteStone;
|
2012-06-05 14:14:20 +02:00
|
|
|
import ee3.lib.CustomItemRarity;
|
2012-07-09 17:42:30 +02:00
|
|
|
import ee3.lib.Reference;
|
2012-06-05 14:14:20 +02:00
|
|
|
|
2012-06-15 22:05:30 +02:00
|
|
|
public class ItemMiniumStone extends ItemEE implements ITransmuteStone {
|
2012-06-05 14:14:20 +02:00
|
|
|
|
|
|
|
public ItemMiniumStone(int i) {
|
|
|
|
super(i);
|
2012-07-09 17:42:30 +02:00
|
|
|
this.setMaxDamage(Reference.MINIUM_STONE_DURABILITY);
|
2012-06-05 14:14:20 +02:00
|
|
|
}
|
2012-06-22 22:01:15 +02:00
|
|
|
|
|
|
|
@Override
|
2012-06-29 21:46:39 +02:00
|
|
|
public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int x, int y, int z, int l) {
|
|
|
|
boolean result = TransmutationHelper.transmuteInWorld(itemStack, entityPlayer, world, x, y, z);
|
2012-06-22 22:01:15 +02:00
|
|
|
|
2012-06-29 21:46:39 +02:00
|
|
|
if (result) {
|
|
|
|
itemStack.damageItem(1, entityPlayer);
|
2012-06-26 22:20:06 +02:00
|
|
|
}
|
|
|
|
|
2012-06-29 21:46:39 +02:00
|
|
|
return result;
|
2012-06-22 22:01:15 +02:00
|
|
|
}
|
2012-06-05 14:14:20 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Returns the custom item rarity type for the item
|
|
|
|
* @see net.minecraft.src.Item#getRarity(net.minecraft.src.ItemStack)
|
|
|
|
*/
|
|
|
|
public EnumRarity getRarity(ItemStack par1ItemStack) {
|
|
|
|
return mod_EE3.proxy.getCustomEnumRarityType(CustomItemRarity.MAGICAL);
|
|
|
|
}
|
|
|
|
}
|