diff options
Diffstat (limited to 'src/Java/miscutil/core/item')
15 files changed, 810 insertions, 0 deletions
diff --git a/src/Java/miscutil/core/item/BaseMetaItemTool.java b/src/Java/miscutil/core/item/BaseMetaItemTool.java new file mode 100644 index 0000000000..c0b552f721 --- /dev/null +++ b/src/Java/miscutil/core/item/BaseMetaItemTool.java @@ -0,0 +1,5 @@ +package miscutil.core.item; + +public class BaseMetaItemTool { + +} diff --git a/src/Java/miscutil/core/item/EntityTeleportFX.java b/src/Java/miscutil/core/item/EntityTeleportFX.java new file mode 100644 index 0000000000..d67ee77968 --- /dev/null +++ b/src/Java/miscutil/core/item/EntityTeleportFX.java @@ -0,0 +1,236 @@ +package miscutil.core.item; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class EntityTeleportFX extends Entity +{ + /** 'x' location the eye should float towards. */ + private double targetX; + /** 'y' location the eye should float towards. */ + private double targetY; + /** 'z' location the eye should float towards. */ + private double targetZ; + private int despawnTimer; + private boolean shatterOrDrop; + private static final String __OBFID = "CL_00001716"; + + public EntityTeleportFX(World p_i1757_1_) + { + super(p_i1757_1_); + this.setSize(0.25F, 0.25F); + } + + protected void entityInit() {} + + /** + * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge + * length * 64 * renderDistanceWeight Args: distance + */ + @SideOnly(Side.CLIENT) + public boolean isInRangeToRenderDist(double p_70112_1_) + { + double d1 = this.boundingBox.getAverageEdgeLength() * 4.0D; + d1 *= 64.0D; + return p_70112_1_ < d1 * d1; + } + + public EntityTeleportFX(World p_i1758_1_, double p_i1758_2_, double p_i1758_4_, double p_i1758_6_) + { + super(p_i1758_1_); + this.despawnTimer = 0; + this.setSize(0.25F, 0.25F); + this.setPosition(p_i1758_2_, p_i1758_4_, p_i1758_6_); + this.yOffset = 0.0F; + } + + /** + * The location the eye should float/move towards. Currently used for moving towards the nearest stronghold. Args: + * strongholdX, strongholdY, strongholdZ + */ + public void moveTowards(double p_70220_1_, int p_70220_3_, double p_70220_4_) + { + double d2 = p_70220_1_ - this.posX; + double d3 = p_70220_4_ - this.posZ; + float f = MathHelper.sqrt_double(d2 * d2 + d3 * d3); + + if (f > 12.0F) + { + this.targetX = this.posX + d2 / (double)f * 12.0D; + this.targetZ = this.posZ + d3 / (double)f * 12.0D; + this.targetY = this.posY + 8.0D; + } + else + { + this.targetX = p_70220_1_; + this.targetY = (double)p_70220_3_; + this.targetZ = p_70220_4_; + } + + this.despawnTimer = 0; + this.shatterOrDrop = this.rand.nextInt(5) > 0; + } + + /** + * Sets the velocity to the args. Args: x, y, z + */ + @SideOnly(Side.CLIENT) + public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) + { + this.motionX = p_70016_1_; + this.motionY = p_70016_3_; + this.motionZ = p_70016_5_; + + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) + { + float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI); + } + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + this.lastTickPosX = this.posX; + this.lastTickPosY = this.posY; + this.lastTickPosZ = this.posZ; + super.onUpdate(); + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + + for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) + { + ; + } + + while (this.rotationPitch - this.prevRotationPitch >= 180.0F) + { + this.prevRotationPitch += 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw < -180.0F) + { + this.prevRotationYaw -= 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw >= 180.0F) + { + this.prevRotationYaw += 360.0F; + } + + this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; + this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; + + if (!this.worldObj.isRemote) + { + double d0 = this.targetX - this.posX; + double d1 = this.targetZ - this.posZ; + float f1 = (float)Math.sqrt(d0 * d0 + d1 * d1); + float f2 = (float)Math.atan2(d1, d0); + double d2 = (double)f + (double)(f1 - f) * 0.0025D; + + if (f1 < 1.0F) + { + d2 *= 0.8D; + this.motionY *= 0.8D; + } + + this.motionX = Math.cos((double)f2) * d2; + this.motionZ = Math.sin((double)f2) * d2; + + if (this.posY < this.targetY) + { + this.motionY += (1.0D - this.motionY) * 0.014999999664723873D; + } + else + { + this.motionY += (-1.0D - this.motionY) * 0.014999999664723873D; + } + } + + float f3 = 0.25F; + + if (this.isInWater()) + { + for (int i = 0; i < 4; ++i) + { + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); + } + } + else + { + this.worldObj.spawnParticle("portal", this.posX - this.motionX * (double)f3 + this.rand.nextDouble() * 0.6D - 0.3D, this.posY - this.motionY * (double)f3 - 0.5D, this.posZ - this.motionZ * (double)f3 + this.rand.nextDouble() * 0.6D - 0.3D, this.motionX, this.motionY, this.motionZ); + } + + if (!this.worldObj.isRemote) + { + this.setPosition(this.posX, this.posY, this.posZ); + ++this.despawnTimer; + + if (this.despawnTimer > 80 && !this.worldObj.isRemote) + { + this.setDead(); + + if (this.shatterOrDrop) + { + this.worldObj.spawnEntityInWorld(new EntityItem(this.worldObj, this.posX, this.posY, this.posZ, new ItemStack(Items.ender_eye))); + } + else + { + this.worldObj.playAuxSFX(2003, (int)Math.round(this.posX), (int)Math.round(this.posY), (int)Math.round(this.posZ), 0); + } + } + } + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound p_70014_1_) {} + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound p_70037_1_) {} + + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + /** + * Gets how bright this entity is. + */ + public float getBrightness(float p_70013_1_) + { + return 1.0F; + } + + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) + { + return 15728880; + } + + /** + * If returns false, the item will not inflict any damage against entities. + */ + public boolean canAttackWithItem() + { + return false; + } +}
\ No newline at end of file diff --git a/src/Java/miscutil/core/item/ModItems.java b/src/Java/miscutil/core/item/ModItems.java new file mode 100644 index 0000000000..7b84f3c589 --- /dev/null +++ b/src/Java/miscutil/core/item/ModItems.java @@ -0,0 +1,311 @@ +package miscutil.core.item; + +import miscutil.core.creativetabs.TMCreativeTabs; +import miscutil.core.item.effects.RarityUncommon; +import miscutil.core.item.tool.staballoy.StaballoyPickaxe; +import miscutil.core.lib.Strings; +import miscutil.core.util.Utils; +import net.minecraft.item.Item; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemArmor.ArmorMaterial; +import net.minecraftforge.common.util.EnumHelper; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.registry.GameRegistry; + +public final class ModItems { +/* A name for the material. This should be the same as the name of the variable we use to store the material (in this case "TUTORIAL"). + A harvest level for pickaxes. This is a value between 0 and 3 and defines which blocks can be mined with this tool. Its also possible to create blocks which need a higher harvest level than 3, but then you are not able to mine them with vanilla tools. + Common values for the harvest level are: + Wood/Gold Tool: 0 + Stone Tool: 1 + Iron Tool: 2 + Diamond Tool: 3 + The durability of the tool or sword. This value defines how often you can use a tool until it breaks. The tools always last one use longer than the entered value. + Common values for the durability are: + Wood Tool: 59 + Stone Tool: 131 + Iron Tool: 250 + Diamond Tool: 1561 + Gold Tool: 32 + The mining speed of the tool. This value defines how much faster you are with this tool than with your hand. + Common values for the mining speed are: + Wood Tool: 2.0F + Stone Tool: 4.0F + Iron Tool: 6.0F + Diamond Tool: 8.0F + Gold Tool: 12.0F + The damage versus Entites. This value is used to calculate the damage an entity takes if you hit it with this tool/sword. This value defines the basic damage to which different values are added, depending on the type of tool. A sword always causes 4 more damage than written in the ToolMaterial. So, if you want to create a sword which adds 10 damage to your normal damage, the value in the ToolMaterial needs to be 6.0F. Of course the values can be below zero. + Common values for the damage versus Entities are: + Wood Tool: 0.0F (Sword adds 4.0 damage) + Stone Tool: 1.0F (Sword adds 5.0 damage) + Iron Tool: 2.0F (Sword adds 6.0 damage) + Diamond Tool: 3.0F (Sword adds 7.0 damage) + Gold Tool: 0.0F (Sword adds 4.0 damage) + The enchantability of this tool. This value is quite complex to understand and I have to admit that I don't quite know how it is calculated. Basically you can say that a higher enchantability leads to better enchantements with the same amount of XP. + Common values for the enchantability are: + Wood Tool: 15 + Stone Tool: 5 + Iron Tool: 14 + Diamond Tool: 10 + Gold Tool: 22*/ + + //Tool Materials + //public static ToolMaterial TUTORIAL = EnumHelper.addToolMaterial("TUTORIAL", harvestLevel, durability, miningSpeed, damageVsEntities, enchantability); + public static ToolMaterial tutMaterial = EnumHelper.addToolMaterial("BloodSteel Tool Material", 3, 200, 15.0F, 4.0F, 10); + public static ToolMaterial STABALLOY = EnumHelper.addToolMaterial("Staballoy", 3, 2500, 7, 1.0F, 18); + + //Armour Materials + public static ArmorMaterial tutArmorMaterial = EnumHelper.addArmorMaterial("BloodSteel Armor Material", 33, new int[]{2, 5, 4, 2}, 10); + + //Base Classes For Items + public static Item tutPickaxe; + public static Item tutAxe; + public static Item tutSword; + public static Item tutHoe; + public static Item tutSpade; + + //Base Classes For Armour + public static Item tutHelmet; + public static Item tutPlate; + public static Item tutPants; + public static Item tutBoots; + + //EnderIO + public static Item itemPlateSoularium; + public static Item itemPlateRedstoneAlloy; + public static Item itemPlateElectricalSteel; + public static Item itemPlatePulsatingIron; + public static Item itemPlateEnergeticAlloy; + public static Item itemPlateVibrantAlloy; + public static Item itemPlateConductiveIron; + public static Item itemPlateDarkSteel; + + //Big Reactors + public static Item itemPlateBlutonium; + public static Item itemPlateCyanite; + public static Item itemPlateLudicrite; + + //Thaumcraft + public static Item itemPlateVoidMetal; + + //ExtraUtils + public static Item itemPlateBedrockium; + + //Pneumaticraft + public static Item itemPlateCompressedIron; + + //SimplyJetpacks + public static Item itemPlateEnrichedSoularium; + + //rfTools + public static Item itemPlateDimensionShard; + + //Misc Items + public static Item itemIngotBloodSteel; + public static Item itemPlateBloodSteel; + + //Staballoy + public static Item itemStaballoyPickaxe; + public static Item itemPlateStaballoy; + public static Item itemIngotStaballoy; + + + + + //@SuppressWarnings("unused") + @SuppressWarnings("unused") + public static final void init(){ + + /* + * + * Strings.DEBUG Parameters area + * + */ + //Logs + if (!Strings.DEBUG){ + Utils.LOG_INFO("Development mode not enabled."); + } + else if (Strings.DEBUG){ + Utils.LOG_INFO("Development mode enabled."); + } + else { + Utils.LOG_WARNING("Development mode not set."); + } + /* + * End Strings.DEBUG + */ + + + + /* //Blood Steel Equipment + + //Item Init + tutPickaxe = new BloodSteelPickaxe(tutMaterial).setUnlocalizedName("BloodSteelPickaxe").setCreativeTab(TMCreativeTabs.tabTools).setTextureName(Strings.MODID + ":BloodSteelPickaxe"); + tutAxe = new BloodSteelAxe(tutMaterial).setUnlocalizedName("BloodSteelAxe").setCreativeTab(TMCreativeTabs.tabTools).setTextureName(Strings.MODID + ":BloodSteelAxe"); + tutSword = new BloodSteelSword(tutMaterial).setUnlocalizedName("BloodSteelSword").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(Strings.MODID + ":BloodSteelSword"); + tutHoe = new BloodSteelHoe(tutMaterial).setUnlocalizedName("BloodSteelHoe").setCreativeTab(TMCreativeTabs.tabTools).setTextureName(Strings.MODID + ":BloodSteelHoe"); + tutSpade = new BloodSteelSpade(tutMaterial).setUnlocalizedName("BloodSteelSpade").setCreativeTab(TMCreativeTabs.tabTools).setTextureName(Strings.MODID + ":BloodSteelSpade"); + tutHelmet = new BloodSteelArmor(tutArmorMaterial, MiscUtils.proxy.addArmor("BloodSteelArmor"), 0).setUnlocalizedName("BloodSteelHelmet").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(Strings.MODID + ":BloodSteelHelmet"); + tutPlate = new BloodSteelArmor(tutArmorMaterial, MiscUtils.proxy.addArmor("BloodSteelArmor"), 1).setUnlocalizedName("BloodSteelPlate").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(Strings.MODID + ":BloodSteelPlate"); + tutPants = new BloodSteelArmor(tutArmorMaterial, MiscUtils.proxy.addArmor("BloodSteelArmor"), 2).setUnlocalizedName("BloodSteelPants").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(Strings.MODID + ":BloodSteelPants"); + tutBoots = new BloodSteelArmor(tutArmorMaterial, MiscUtils.proxy.addArmor("BloodSteelArmor"), 3).setUnlocalizedName("BloodSteelBoots").setCreativeTab(TMCreativeTabs.tabCombat).setTextureName(Strings.MODID + ":BloodSteelBoots"); + + //Registry + GameRegistry.registerItem(tutPickaxe, tutPickaxe.getUnlocalizedName()); + GameRegistry.registerItem(tutAxe, tutAxe.getUnlocalizedName()); + GameRegistry.registerItem(tutSword, tutSword.getUnlocalizedName()); + GameRegistry.registerItem(tutHoe, tutHoe.getUnlocalizedName()); + GameRegistry.registerItem(tutSpade, tutSpade.getUnlocalizedName()); + GameRegistry.registerItem(tutHelmet, tutHelmet.getUnlocalizedName()); + GameRegistry.registerItem(tutPlate, tutPlate.getUnlocalizedName()); + GameRegistry.registerItem(tutPants, tutPants.getUnlocalizedName()); + GameRegistry.registerItem(tutBoots, tutBoots.getUnlocalizedName()); */ + + + + + + + //EnderIO Resources + if (Loader.isModLoaded("EnderIO") == true || Strings.LOAD_ALL_CONTENT){ + Utils.LOG_INFO("EnderIO Found - Loading Resources."); + //Item Init + itemPlateSoularium = new Item().setUnlocalizedName("itemPlateSoularium").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateSoularium");; + itemPlateRedstoneAlloy = new Item().setUnlocalizedName("itemPlateRedstoneAlloy").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateRedstoneAlloy");; + itemPlateElectricalSteel = new Item().setUnlocalizedName("itemPlateElectricalSteel").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateElectricalSteel");; + itemPlatePulsatingIron = new Item().setUnlocalizedName("itemPlatePulsatingIron").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlatePulsatingIron");; + itemPlateEnergeticAlloy = new Item().setUnlocalizedName("itemPlateEnergeticAlloy").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateEnergeticAlloy");; + itemPlateVibrantAlloy = new Item().setUnlocalizedName("itemPlateVibrantAlloy").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateVibrantAlloy");; + itemPlateConductiveIron = new Item().setUnlocalizedName("itemPlateConductiveIron").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateConductiveIron");; + itemPlateDarkSteel = new Item().setUnlocalizedName("itemPlateDarkSteel").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateDarkSteel");; + + + //Registry + GameRegistry.registerItem(itemPlateSoularium, "itemPlateSoularium"); + GameRegistry.registerItem(itemPlateRedstoneAlloy, "itemPlateRedstoneAlloy"); + GameRegistry.registerItem(itemPlateElectricalSteel, "itemPlateElectricalSteel"); + GameRegistry.registerItem(itemPlatePulsatingIron, "itemPlatePulsatingIron"); + GameRegistry.registerItem(itemPlateEnergeticAlloy, "itemPlateEnergeticAlloy"); + GameRegistry.registerItem(itemPlateVibrantAlloy, "itemPlateVibrantAlloy"); + GameRegistry.registerItem(itemPlateConductiveIron, "itemPlateConductiveIron"); + GameRegistry.registerItem(itemPlateDarkSteel, "itemPlateDarkSteel"); + } + else { + Utils.LOG_WARNING("EnderIO not Found - Skipping Resources."); + } + + //Big Reactors + if (Loader.isModLoaded("BigReactors") == true || Strings.LOAD_ALL_CONTENT){ + Utils.LOG_INFO("BigReactors Found - Loading Resources."); + //Item Init + itemPlateBlutonium = new Item().setUnlocalizedName("itemPlateBlutonium").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateBlutonium");; + itemPlateCyanite = new Item().setUnlocalizedName("itemPlateCyanite").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateCyanite");; + itemPlateLudicrite = new Item().setUnlocalizedName("itemPlateLudicrite").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateLudicrite");; + + //Registry + GameRegistry.registerItem(itemPlateBlutonium, "itemPlateBlutonium"); + GameRegistry.registerItem(itemPlateCyanite, "itemPlateCyanite"); + GameRegistry.registerItem(itemPlateLudicrite, "itemPlateLudicrite"); + + } + else { + Utils.LOG_WARNING("BigReactors not Found - Skipping Resources."); + } + + //Thaumcraft + if (Loader.isModLoaded("Thaumcraft") == true || Strings.LOAD_ALL_CONTENT){ + Utils.LOG_INFO("Thaumcraft Found - Loading Resources."); + //Item Init + itemPlateVoidMetal = new Item().setUnlocalizedName("itemPlateVoidMetal").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateVoidMetal");; + + //Registry + GameRegistry.registerItem(itemPlateVoidMetal, "itemPlateVoidMetal"); + + } + else { + Utils.LOG_WARNING("Thaumcraft not Found - Skipping Resources."); + } + + //ExtraUtils + if (Loader.isModLoaded("ExtraUtilities") == true || Strings.LOAD_ALL_CONTENT){ + Utils.LOG_INFO("ExtraUtilities Found - Loading Resources."); + //Item Init + itemPlateBedrockium = new Item().setUnlocalizedName("itemPlateBedrockium").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateBedrockium");; + + //Registry + GameRegistry.registerItem(itemPlateBedrockium, "itemPlateBedrockium"); + + } + else { + Utils.LOG_WARNING("ExtraUtilities not Found - Skipping Resources."); + } + + //Pneumaticraft + if (Loader.isModLoaded("PneumaticCraft") == true || Strings.LOAD_ALL_CONTENT){ + Utils.LOG_INFO("PneumaticCraft Found - Loading Resources."); + //Item Init + itemPlateCompressedIron = new Item().setUnlocalizedName("itemPlateCompressedIron").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateCompressedIron");; + + //Registry + GameRegistry.registerItem(itemPlateCompressedIron, "itemPlateCompressedIron"); + + } + else { + Utils.LOG_WARNING("PneumaticCraft not Found - Skipping Resources."); + } + + //Simply Jetpacks + if (Loader.isModLoaded("simplyjetpacks") == true || Strings.LOAD_ALL_CONTENT){ + Utils.LOG_INFO("SimplyJetpacks Found - Loading Resources."); + //Item Init + itemPlateEnrichedSoularium = new RarityUncommon().setUnlocalizedName("itemPlateEnrichedSoularium").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateSoularium");; + + //Registry + GameRegistry.registerItem(itemPlateEnrichedSoularium, "itemPlateEnrichedSoularium"); + + } + else { + Utils.LOG_WARNING("SimplyJetpacks not Found - Skipping Resources."); + } + + + //rfTools + if (Loader.isModLoaded("rftools") == true || Strings.LOAD_ALL_CONTENT){ + Utils.LOG_INFO("rfTools Found - Loading Resources."); + //Item Init + itemPlateDimensionShard = new Item().setUnlocalizedName("itemPlateDimensionShard").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateDimensionShard");; + + //Registry + GameRegistry.registerItem(itemPlateDimensionShard, "itemPlateDimensionShard"); + + } + else { + Utils.LOG_WARNING("rfTools not Found - Skipping Resources."); + } + + /* + * Misc Items + */ + + //Staballoy Equipment + Utils.LOG_INFO("Interest in Stablloy Found - Loading Resources."); + //Pickaxe + itemStaballoyPickaxe = new StaballoyPickaxe("itemStaballoyPickaxe", STABALLOY).setCreativeTab(TMCreativeTabs.tabTools); + GameRegistry.registerItem(itemStaballoyPickaxe, itemStaballoyPickaxe.getUnlocalizedName()); + //Staballoy Ingot/Plate + itemIngotStaballoy = new Item().setUnlocalizedName("itemIngotStaballoy").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemIngotStaballoy");; + GameRegistry.registerItem(itemIngotStaballoy, "itemIngotStaballoy"); + itemPlateStaballoy = new Item().setUnlocalizedName("itemPlateStaballoy").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemPlateStaballoy");; + GameRegistry.registerItem(itemPlateStaballoy, "itemPlateStaballoy"); + //GregTech_API.sRecipeAdder.addAlloySmelterRecipe(, aInput2, aOutput1, aDuration, aEUt) + + + + //Blood Steel Ingot + itemIngotBloodSteel = new Item().setUnlocalizedName("itemIngotBloodSteel").setCreativeTab(TMCreativeTabs.tabMisc).setTextureName(Strings.MODID + ":itemIngotBloodSteel");; + GameRegistry.registerItem(itemIngotBloodSteel, "itemIngotBloodSteel"); + + + } + +} diff --git a/src/Java/miscutil/core/item/effects/RarityEffect.java b/src/Java/miscutil/core/item/effects/RarityEffect.java new file mode 100644 index 0000000000..41ba2d6baf --- /dev/null +++ b/src/Java/miscutil/core/item/effects/RarityEffect.java @@ -0,0 +1,41 @@ +package miscutil.core.item.effects; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/* + * +This determines the name colour. EnumRarity can be: +EnumRarity.common - the standard white colour. +EnumRarity.uncommon - a yellow colour. +EnumRarity.rare - a light blue colour. This is used for enchanted items. +EnumRarity.epic - the purple colour used on the Golden Apple. +@SideOnly is an FML annotation. It marks the method below it for existing only on one side. Possible values are: +Side.CLIENT is probably the most common one. This marks the method as existing only on the client side. +Side.SERVER marks the method as existing only on the server side. + * + */ + +public class RarityEffect extends Item { + + public RarityEffect(int par1){ + super(); + this.setCreativeTab(CreativeTabs.tabMaterials); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(ItemStack par1ItemStack){ + return EnumRarity.common; + } + + @Override + public boolean hasEffect(ItemStack par1ItemStack){ + return true; + } + +} diff --git a/src/Java/miscutil/core/item/effects/RarityEpic.java b/src/Java/miscutil/core/item/effects/RarityEpic.java new file mode 100644 index 0000000000..dfcaaa9007 --- /dev/null +++ b/src/Java/miscutil/core/item/effects/RarityEpic.java @@ -0,0 +1,28 @@ +package miscutil.core.item.effects; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class RarityEpic extends Item { + + public RarityEpic(int par1){ + super(); + this.setCreativeTab(CreativeTabs.tabMaterials); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(ItemStack par1ItemStack){ + return EnumRarity.epic; + } + + @Override + public boolean hasEffect(ItemStack par1ItemStack){ + return true; + } + +} diff --git a/src/Java/miscutil/core/item/effects/RarityRare.java b/src/Java/miscutil/core/item/effects/RarityRare.java new file mode 100644 index 0000000000..6afc9b6733 --- /dev/null +++ b/src/Java/miscutil/core/item/effects/RarityRare.java @@ -0,0 +1,28 @@ +package miscutil.core.item.effects; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class RarityRare extends Item { + + public RarityRare(int par1){ + super(); + this.setCreativeTab(CreativeTabs.tabMaterials); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(ItemStack par1ItemStack){ + return EnumRarity.rare; + } + + @Override + public boolean hasEffect(ItemStack par1ItemStack){ + return true; + } + +} diff --git a/src/Java/miscutil/core/item/effects/RarityUncommon.java b/src/Java/miscutil/core/item/effects/RarityUncommon.java new file mode 100644 index 0000000000..4347dc70f5 --- /dev/null +++ b/src/Java/miscutil/core/item/effects/RarityUncommon.java @@ -0,0 +1,22 @@ +package miscutil.core.item.effects; + +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class RarityUncommon extends Item { + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(ItemStack par1ItemStack){ + return EnumRarity.uncommon; + } + + @Override + public boolean hasEffect(ItemStack par1ItemStack){ + return true; + } + +} diff --git a/src/Java/miscutil/core/item/materials/MaterialHandler.java b/src/Java/miscutil/core/item/materials/MaterialHandler.java new file mode 100644 index 0000000000..3c57d21f90 --- /dev/null +++ b/src/Java/miscutil/core/item/materials/MaterialHandler.java @@ -0,0 +1,9 @@ +package miscutil.core.item.materials; + +public class MaterialHandler { + + private String Staballoy; + + + +} diff --git a/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelArmor.java b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelArmor.java new file mode 100644 index 0000000000..11bc400587 --- /dev/null +++ b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelArmor.java @@ -0,0 +1,56 @@ +package miscutil.core.item.tool.bloodsteel; + +import miscutil.core.item.ModItems; +import miscutil.core.lib.Strings; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +public class BloodSteelArmor extends ItemArmor { + + public BloodSteelArmor(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) { + super(p_i45325_1_, p_i45325_2_, p_i45325_3_); + // TODO Auto-generated constructor stub + } + + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + if (stack.getItem() == ModItems.tutHelmet || stack.getItem() == ModItems.tutPlate || stack.getItem() == ModItems.tutBoots) { + return Strings.MODID + ":textures/armor/BloodSteelArmor1.png"; + } else if (stack.getItem() == ModItems.tutPants) { + return Strings.MODID + ":textures/armor/BloodSteelArmor2.png"; + } else { + return null; + } + } + + /** + * Called to tick armor in the armor slot. Override to do something + * + * @param world + * @param player + * @param itemStack + */ + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + if(player.getCurrentArmor(3) != null && player.getCurrentArmor(2) != null && player.getCurrentArmor(1) != null){ + ItemStack helmet = player.getCurrentArmor(3); + ItemStack plate = player.getCurrentArmor(2); + ItemStack pants = player.getCurrentArmor(1); + if(helmet.getItem() == ModItems.tutHelmet && plate.getItem() == ModItems.tutPlate && pants.getItem() == ModItems.tutPants){ + //player.addPotionEffect(new PotionEffect(Potion.confusion.getId(), 100, 1)); + player.capabilities.allowFlying = true; + } + } + + if(player.getCurrentArmor(0) != null){ + ItemStack boots = player.getCurrentArmor(0); + if(boots.getItem() == ModItems.tutBoots){ + player.addPotionEffect(new PotionEffect(Potion.jump.getId(), 100, 1)); + } + } + } + +} diff --git a/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelAxe.java b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelAxe.java new file mode 100644 index 0000000000..6353aa3631 --- /dev/null +++ b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelAxe.java @@ -0,0 +1,12 @@ +package miscutil.core.item.tool.bloodsteel; + +import net.minecraft.item.ItemAxe; + +public class BloodSteelAxe extends ItemAxe{ + + protected BloodSteelAxe(ToolMaterial p_i45327_1_) { + super(p_i45327_1_); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelHoe.java b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelHoe.java new file mode 100644 index 0000000000..0115c08d00 --- /dev/null +++ b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelHoe.java @@ -0,0 +1,12 @@ +package miscutil.core.item.tool.bloodsteel; + +import net.minecraft.item.ItemHoe; + +public class BloodSteelHoe extends ItemHoe{ + + public BloodSteelHoe(ToolMaterial p_i45343_1_) { + super(p_i45343_1_); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelPickaxe.java b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelPickaxe.java new file mode 100644 index 0000000000..d2c5d467b5 --- /dev/null +++ b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelPickaxe.java @@ -0,0 +1,12 @@ +package miscutil.core.item.tool.bloodsteel; + +import net.minecraft.item.ItemPickaxe; + +public class BloodSteelPickaxe extends ItemPickaxe{ + + protected BloodSteelPickaxe(ToolMaterial p_i45347_1_) { + super(p_i45347_1_); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelSpade.java b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelSpade.java new file mode 100644 index 0000000000..15318d7382 --- /dev/null +++ b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelSpade.java @@ -0,0 +1,12 @@ +package miscutil.core.item.tool.bloodsteel; + +import net.minecraft.item.ItemSpade; + +public class BloodSteelSpade extends ItemSpade{ + + public BloodSteelSpade(ToolMaterial p_i45353_1_) { + super(p_i45353_1_); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelSword.java b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelSword.java new file mode 100644 index 0000000000..96d11331a0 --- /dev/null +++ b/src/Java/miscutil/core/item/tool/bloodsteel/BloodSteelSword.java @@ -0,0 +1,12 @@ +package miscutil.core.item.tool.bloodsteel; + +import net.minecraft.item.ItemSword; + +public class BloodSteelSword extends ItemSword{ + + public BloodSteelSword(ToolMaterial p_i45356_1_) { + super(p_i45356_1_); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/Java/miscutil/core/item/tool/staballoy/StaballoyPickaxe.java b/src/Java/miscutil/core/item/tool/staballoy/StaballoyPickaxe.java new file mode 100644 index 0000000000..2453f9f6e2 --- /dev/null +++ b/src/Java/miscutil/core/item/tool/staballoy/StaballoyPickaxe.java @@ -0,0 +1,14 @@ +package miscutil.core.item.tool.staballoy; + +import miscutil.core.lib.Strings; +import net.minecraft.item.ItemPickaxe; + +public class StaballoyPickaxe extends ItemPickaxe{ + + public StaballoyPickaxe(String unlocalizedName, ToolMaterial material) { + super(material); + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(Strings.MODID + ":" + unlocalizedName); + } + +} |