Added void shards. Need smelting recipes (with special effects).
This commit is contained in:
parent
a96e9dc140
commit
b5b2ddec92
7 changed files with 103 additions and 6 deletions
|
|
@ -65,11 +65,13 @@ public class Config
|
||||||
ItemIds.IRIDIUM_LEGGINGS = config.getItem(Strings.IRIDIUM_LEGGINGS_NAME, ItemIds.IRIDIUM_LEGGINGS_DEFAULT).getInt(ItemIds.IRIDIUM_LEGGINGS_DEFAULT);
|
ItemIds.IRIDIUM_LEGGINGS = config.getItem(Strings.IRIDIUM_LEGGINGS_NAME, ItemIds.IRIDIUM_LEGGINGS_DEFAULT).getInt(ItemIds.IRIDIUM_LEGGINGS_DEFAULT);
|
||||||
ItemIds.IRIDIUM_BOOTS = config.getItem(Strings.IRIDIUM_BOOTS_NAME, ItemIds.IRIDIUM_BOOTS_DEFAULT).getInt(ItemIds.IRIDIUM_BOOTS_DEFAULT);
|
ItemIds.IRIDIUM_BOOTS = config.getItem(Strings.IRIDIUM_BOOTS_NAME, ItemIds.IRIDIUM_BOOTS_DEFAULT).getInt(ItemIds.IRIDIUM_BOOTS_DEFAULT);
|
||||||
|
|
||||||
ItemIds.FIRE_ORB = config.getItem(Strings.FIRE_ORB_NAME, ItemIds.FIRE_ORB_DEFAULT).getInt(ItemIds.FIRE_ORB);
|
ItemIds.FIRE_ORB = config.getItem(Strings.FIRE_ORB_NAME, ItemIds.FIRE_ORB_DEFAULT).getInt(ItemIds.FIRE_ORB_DEFAULT);
|
||||||
ItemIds.WATER_ORB = config.getItem(Strings.WATER_ORB_NAME, ItemIds.WATER_ORB_DEFAULT).getInt(ItemIds.WATER_ORB);
|
ItemIds.WATER_ORB = config.getItem(Strings.WATER_ORB_NAME, ItemIds.WATER_ORB_DEFAULT).getInt(ItemIds.WATER_ORB_DEFAULT);
|
||||||
ItemIds.EARTH_ORB = config.getItem(Strings.EARTH_ORB_NAME, ItemIds.EARTH_ORB_DEFAULT).getInt(ItemIds.EARTH_ORB);
|
ItemIds.EARTH_ORB = config.getItem(Strings.EARTH_ORB_NAME, ItemIds.EARTH_ORB_DEFAULT).getInt(ItemIds.EARTH_ORB_DEFAULT);
|
||||||
ItemIds.AIR_ORB = config.getItem(Strings.AIR_ORB_NAME, ItemIds.AIR_ORB_DEFAULT).getInt(ItemIds.AIR_ORB);
|
ItemIds.AIR_ORB = config.getItem(Strings.AIR_ORB_NAME, ItemIds.AIR_ORB_DEFAULT).getInt(ItemIds.AIR_ORB_DEFAULT);
|
||||||
ItemIds.ENERGY_ORB = config.getItem(Strings.ENERGY_ORB_NAME, ItemIds.ENERGY_ORB_DEFAULT).getInt(ItemIds.ENERGY_ORB);
|
ItemIds.ENERGY_ORB = config.getItem(Strings.ENERGY_ORB_NAME, ItemIds.ENERGY_ORB_DEFAULT).getInt(ItemIds.ENERGY_ORB_DEFAULT);
|
||||||
|
|
||||||
|
ItemIds.VOID_SHARD = config.getItem(Strings.VOID_SHARD_NAME, ItemIds.VOID_SHARD_DEFAULT).getInt(ItemIds.VOID_SHARD_DEFAULT);
|
||||||
|
|
||||||
config.save();
|
config.save();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,9 @@ public class ItemHandler$1 {
|
||||||
public static Item iridiumChestplate;
|
public static Item iridiumChestplate;
|
||||||
public static Item iridiumLeggings;
|
public static Item iridiumLeggings;
|
||||||
public static Item iridiumBoots;
|
public static Item iridiumBoots;
|
||||||
|
|
||||||
|
|
||||||
|
public static Item voidShard;
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
|
|
||||||
staffParts = new ItemStaffParts(ItemIds.STAFF_PARTS);
|
staffParts = new ItemStaffParts(ItemIds.STAFF_PARTS);
|
||||||
|
|
@ -101,5 +102,7 @@ public class ItemHandler$1 {
|
||||||
iridiumChestplate = new ItemArmorIridium(ItemIds.IRIDIUM_CHESTPLATE, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 1).setUnlocalizedName(Strings.IRIDIUM_CHESTPLATE_NAME);
|
iridiumChestplate = new ItemArmorIridium(ItemIds.IRIDIUM_CHESTPLATE, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 1).setUnlocalizedName(Strings.IRIDIUM_CHESTPLATE_NAME);
|
||||||
iridiumLeggings = new ItemArmorIridium(ItemIds.IRIDIUM_LEGGINGS, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 2).setUnlocalizedName(Strings.IRIDIUM_LEGGINGS_NAME);
|
iridiumLeggings = new ItemArmorIridium(ItemIds.IRIDIUM_LEGGINGS, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 2).setUnlocalizedName(Strings.IRIDIUM_LEGGINGS_NAME);
|
||||||
iridiumBoots = new ItemArmorIridium(ItemIds.IRIDIUM_BOOTS, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 3).setUnlocalizedName(Strings.IRIDIUM_BOOTS_NAME);
|
iridiumBoots = new ItemArmorIridium(ItemIds.IRIDIUM_BOOTS, EnumArmor.Iridium, MysticWorld.proxy.addArmor(EnumArmor.Iridium.name()), 3).setUnlocalizedName(Strings.IRIDIUM_BOOTS_NAME);
|
||||||
|
|
||||||
|
voidShard = new ItemVoidShard(ItemIds.VOID_SHARD).setUnlocalizedName(Strings.VOID_SHARD_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
84
common/MysticWorld/Items/ItemVoidShard.java
Normal file
84
common/MysticWorld/Items/ItemVoidShard.java
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
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 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.world.World;
|
||||||
|
|
||||||
|
public class ItemVoidShard extends Item {
|
||||||
|
|
||||||
|
public ItemVoidShard(int id) {
|
||||||
|
super(id);
|
||||||
|
this.setMaxStackSize(1);
|
||||||
|
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||||
|
this.setMaxDamage(30);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
|
||||||
|
{
|
||||||
|
if (itemStack.stackTagCompound == null)
|
||||||
|
itemStack.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
|
int currentExperience = entityPlayer.experienceLevel;
|
||||||
|
|
||||||
|
if (itemStack.stackTagCompound.getBoolean("filled") == false)
|
||||||
|
{
|
||||||
|
if (currentExperience > 0)
|
||||||
|
{
|
||||||
|
entityPlayer.experienceLevel = 0;
|
||||||
|
itemStack.stackTagCompound.setInteger("xpStored", currentExperience);
|
||||||
|
itemStack.stackTagCompound.setBoolean("filled", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
entityPlayer.experienceLevel += itemStack.stackTagCompound.getInteger("xpStored");
|
||||||
|
itemStack.stackTagCompound.setInteger("xpStored", 0);
|
||||||
|
itemStack.stackTagCompound.setBoolean("filled", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
public void registerIcons(IconRegister iconRegister)
|
||||||
|
{
|
||||||
|
itemIcon = iconRegister.registerIcon("MysticTextures:ShardVoid");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -78,6 +78,8 @@ public class Lang
|
||||||
LanguageRegistry.instance().addName(ItemHandler$1.airOrb, "Air Orb");
|
LanguageRegistry.instance().addName(ItemHandler$1.airOrb, "Air Orb");
|
||||||
LanguageRegistry.instance().addName(ItemHandler$1.energyOrb, "Energy Orb");
|
LanguageRegistry.instance().addName(ItemHandler$1.energyOrb, "Energy Orb");
|
||||||
|
|
||||||
|
LanguageRegistry.instance().addName(ItemHandler$1.voidShard, "Void Shard");
|
||||||
|
|
||||||
for (int i = 0; i < 12; i++)
|
for (int i = 0; i < 12; i++)
|
||||||
{
|
{
|
||||||
LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.bushFruit, 1, i), "Strange Fruit");
|
LanguageRegistry.instance().addName(new ItemStack(ItemHandler$1.bushFruit, 1, i), "Strange Fruit");
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,8 @@ public class ItemIds {
|
||||||
public static int AIR_ORB_DEFAULT = 5531;
|
public static int AIR_ORB_DEFAULT = 5531;
|
||||||
public static int ENERGY_ORB_DEFAULT = 5532;
|
public static int ENERGY_ORB_DEFAULT = 5532;
|
||||||
|
|
||||||
|
public static int VOID_SHARD_DEFAULT = 5533;
|
||||||
|
|
||||||
//Current Item IDs
|
//Current Item IDs
|
||||||
public static int STAFF_PARTS;
|
public static int STAFF_PARTS;
|
||||||
|
|
||||||
|
|
@ -83,4 +85,6 @@ public class ItemIds {
|
||||||
public static int EARTH_ORB;
|
public static int EARTH_ORB;
|
||||||
public static int AIR_ORB;
|
public static int AIR_ORB;
|
||||||
public static int ENERGY_ORB;
|
public static int ENERGY_ORB;
|
||||||
|
|
||||||
|
public static int VOID_SHARD;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,8 @@ public class Strings {
|
||||||
public static final String IRIDIUM_LEGGINGS_NAME = "iridiumLeggings";
|
public static final String IRIDIUM_LEGGINGS_NAME = "iridiumLeggings";
|
||||||
public static final String IRIDIUM_BOOTS_NAME = "iridiumBoots";
|
public static final String IRIDIUM_BOOTS_NAME = "iridiumBoots";
|
||||||
|
|
||||||
|
public static final String VOID_SHARD_NAME = "voidShard";
|
||||||
|
|
||||||
//Entity Names
|
//Entity Names
|
||||||
public static final String ENTITY_AIR_CHARGE_NAME = "entityAirCharge";
|
public static final String ENTITY_AIR_CHARGE_NAME = "entityAirCharge";
|
||||||
public static final String ENTITY_FIREBALL_NAME = "entityFireball";
|
public static final String ENTITY_FIREBALL_NAME = "entityFireball";
|
||||||
|
|
|
||||||
BIN
resources/assets/mystictextures/textures/items/ShardVoid.png
Normal file
BIN
resources/assets/mystictextures/textures/items/ShardVoid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 272 B |
Loading…
Reference in a new issue