diff --git a/BM_src/WayofTime/alchemicalWizardry/client/ClientProxy.java b/BM_src/WayofTime/alchemicalWizardry/client/ClientProxy.java index cc82c6cb..e573e4f4 100644 --- a/BM_src/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/BM_src/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -1,61 +1,25 @@ package WayofTime.alchemicalWizardry.client; -import net.minecraft.world.World; -import net.minecraftforge.client.MinecraftForgeClient; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.CommonProxy; import WayofTime.alchemicalWizardry.common.EntityAirElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; +import WayofTime.alchemicalWizardry.common.ModBlocks; +import WayofTime.alchemicalWizardry.common.entity.mob.*; import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderPedestal; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderPlinth; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderWritingTable; -import WayofTime.alchemicalWizardry.common.renderer.block.TEAltarRenderer; +import WayofTime.alchemicalWizardry.common.renderer.block.*; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBileDemon; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBoulderFist; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderElemental; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderFallenAngel; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderIceDemon; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderLowerGuardian; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderShade; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderSmallEarthGolem; -import WayofTime.alchemicalWizardry.common.renderer.mob.RenderWingedFireDemon; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBileDemon; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBoulderFist; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelElemental; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelFallenAngel; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelIceDemon; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelLowerGuardian; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelShade; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSmallEarthGolem; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWingedFireDemon; +import WayofTime.alchemicalWizardry.common.renderer.mob.*; +import WayofTime.alchemicalWizardry.common.renderer.model.*; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazookaMainProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.*; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; +import net.minecraft.world.World; +import net.minecraftforge.client.MinecraftForgeClient; public class ClientProxy extends CommonProxy { @@ -115,7 +79,7 @@ public class ClientProxy extends CommonProxy public void InitRendering() { ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer()); - MinecraftForgeClient.registerItemRenderer(AlchemicalWizardry.blockAltar.blockID, new TEAltarItemRenderer()); + MinecraftForgeClient.registerItemRenderer(ModBlocks.blockAltar.blockID, new TEAltarItemRenderer()); //MinecraftForgeClient.registerItemRenderer(AlchemicalWizardry.blockWritingTable.blockID, new TEWritingTableItemRenderer()); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardry.java b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardry.java index 7585ebad..a896db10 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardry.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardry.java @@ -1,152 +1,22 @@ package WayofTime.alchemicalWizardry.common; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumArmorMaterial; -import net.minecraft.item.EnumToolMaterial; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.common.Configuration; -import net.minecraftforge.common.EnumHelper; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.oredict.OreDictionary; -import thaumcraft.api.ItemApi; -import WayofTime.alchemicalWizardry.TestingBlock; import WayofTime.alchemicalWizardry.common.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.common.block.ArmourForge; -import WayofTime.alchemicalWizardry.common.block.BlockAltar; -import WayofTime.alchemicalWizardry.common.block.BlockBloodLightSource; -import WayofTime.alchemicalWizardry.common.block.BlockHomHeart; -import WayofTime.alchemicalWizardry.common.block.BlockMasterStone; -import WayofTime.alchemicalWizardry.common.block.BlockPedestal; -import WayofTime.alchemicalWizardry.common.block.BlockPlinth; -import WayofTime.alchemicalWizardry.common.block.BlockSocket; -import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.block.BlockWritingTable; -import WayofTime.alchemicalWizardry.common.block.BloodRune; -import WayofTime.alchemicalWizardry.common.block.BloodStoneBrick; -import WayofTime.alchemicalWizardry.common.block.EfficiencyRune; -import WayofTime.alchemicalWizardry.common.block.EmptySocket; -import WayofTime.alchemicalWizardry.common.block.ImperfectRitualStone; -import WayofTime.alchemicalWizardry.common.block.LargeBloodStoneBrick; import WayofTime.alchemicalWizardry.common.block.LifeEssenceBlock; -import WayofTime.alchemicalWizardry.common.block.RitualStone; -import WayofTime.alchemicalWizardry.common.block.RuneOfSacrifice; -import WayofTime.alchemicalWizardry.common.block.RuneOfSelfSacrifice; -import WayofTime.alchemicalWizardry.common.block.SpectralBlock; -import WayofTime.alchemicalWizardry.common.block.SpeedRune; import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; -import WayofTime.alchemicalWizardry.common.items.AWBaseItems; -import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; -import WayofTime.alchemicalWizardry.common.items.AirScribeTool; -import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb; -import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb; -import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor; -import WayofTime.alchemicalWizardry.common.items.BlankSpell; -import WayofTime.alchemicalWizardry.common.items.BloodShard; -import WayofTime.alchemicalWizardry.common.items.BoundArmour; -import WayofTime.alchemicalWizardry.common.items.BoundAxe; -import WayofTime.alchemicalWizardry.common.items.BoundPickaxe; -import WayofTime.alchemicalWizardry.common.items.BoundShovel; -import WayofTime.alchemicalWizardry.common.items.CheatyItem; -import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice; -import WayofTime.alchemicalWizardry.common.items.DemonPlacer; -import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.DuskScribeTool; -import WayofTime.alchemicalWizardry.common.items.EarthScribeTool; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -import WayofTime.alchemicalWizardry.common.items.EnergyBazooka; -import WayofTime.alchemicalWizardry.common.items.EnergyBlast; -import WayofTime.alchemicalWizardry.common.items.EnergySword; -import WayofTime.alchemicalWizardry.common.items.FireScribeTool; +import WayofTime.alchemicalWizardry.common.entity.mob.*; import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock; -import WayofTime.alchemicalWizardry.common.items.ItemDiabloKey; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import WayofTime.alchemicalWizardry.common.items.ItemSanguineArmour; -import WayofTime.alchemicalWizardry.common.items.LavaCrystal; import WayofTime.alchemicalWizardry.common.items.LifeBucket; -import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb; -import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb; -import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.SacrificialDagger; -import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.WaterScribeTool; -import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; -import WayofTime.alchemicalWizardry.common.items.potion.AlchemyReagent; -import WayofTime.alchemicalWizardry.common.items.potion.AverageLengtheningCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.AveragePowerCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.EnhancedFillingAgent; -import WayofTime.alchemicalWizardry.common.items.potion.EnhancedTelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.potion.GreaterLengtheningCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.GreaterPowerCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.MundaneLengtheningCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.MundanePowerCatalyst; -import WayofTime.alchemicalWizardry.common.items.potion.StandardBindingAgent; -import WayofTime.alchemicalWizardry.common.items.potion.StandardFillingAgent; -import WayofTime.alchemicalWizardry.common.items.potion.WeakBindingAgent; -import WayofTime.alchemicalWizardry.common.items.potion.WeakFillingAgent; -import WayofTime.alchemicalWizardry.common.items.sigil.AirSigil; -import WayofTime.alchemicalWizardry.common.items.sigil.DivinationSigil; -import WayofTime.alchemicalWizardry.common.items.sigil.ItemBloodLightSigil; -import WayofTime.alchemicalWizardry.common.items.sigil.LavaSigil; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfElementalAffinity; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfGrowth; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHaste; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfMagnetism; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheBridge; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheFastMiner; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfWind; -import WayofTime.alchemicalWizardry.common.items.sigil.VoidSigil; -import WayofTime.alchemicalWizardry.common.items.sigil.WaterSigil; import WayofTime.alchemicalWizardry.common.rituals.Rituals; -import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellEarthBender; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellExplosions; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellFireBurst; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellFrozenWater; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellHolyBlast; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellLightningBolt; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust; +import WayofTime.alchemicalWizardry.common.spell.simple.*; import WayofTime.alchemicalWizardry.common.summoning.SummoningHelper; import WayofTime.alchemicalWizardry.common.summoning.SummoningRegistry; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.*; import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; @@ -163,6 +33,26 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.TickRegistry; import cpw.mods.fml.relauncher.Side; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumArmorMaterial; +import net.minecraft.item.EnumToolMaterial; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; +import net.minecraftforge.common.EnumHelper; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ItemApi; + +import java.io.File; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v0.7.2") @NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {"BloodAltar", "particle", "SetLifeEssence", "GetLifeEssence", "Ritual", "GetAltarEssence", "TESocket", "TEWritingTable", "CustomParticle", "SetPlayerVel", "SetPlayerPos", "TEPedestal", "TEPlinth", "TETeleposer", "InfiniteLPPath", "TEOrientor"}, packetHandler = PacketHandler.class) @@ -199,21 +89,21 @@ public class AlchemicalWizardry { public ItemStack getIconItemStack() { - return new ItemStack(AlchemicalWizardry.weakBloodOrb, 1, 0); + return new ItemStack(ModItems.weakBloodOrb, 1, 0); } }; public static EnumToolMaterial bloodBoundToolMaterial = EnumHelper.addToolMaterial("BoundBlood", 4, 1000, 12.0f, 8.0f, 50); - public static EnumArmorMaterial sanguineArmourArmourMaterial = EnumHelper.addArmorMaterial("SanguineArmour", 1000, new int[] {3, 6, 5, 2}, 30); + public static EnumArmorMaterial sanguineArmourArmourMaterial = EnumHelper.addArmorMaterial("SanguineArmour", 1000, new int[]{3, 6, 5, 2}, 30); //Dungeon loot chances - public int standardBindingAgentDungeonChance; - public int mundanePowerCatalystDungeonChance; - public int averagePowerCatalystDungeonChance; - public int greaterPowerCatalystDungeonChance; - public int mundaneLengtheningCatalystDungeonChance; - public int averageLengtheningCatalystDungeonChance; - public int greaterLengtheningCatalystDungeonChance; + public static int standardBindingAgentDungeonChance; + public static int mundanePowerCatalystDungeonChance; + public static int averagePowerCatalystDungeonChance; + public static int greaterPowerCatalystDungeonChance; + public static int mundaneLengtheningCatalystDungeonChance; + public static int averageLengtheningCatalystDungeonChance; + public static int greaterLengtheningCatalystDungeonChance; //Mob IDs public static int entityFallenAngelID = 20; @@ -231,122 +121,6 @@ public class AlchemicalWizardry public static int entityShadeElementalID = 32; public static int entityHolyElementalID = 33; - public static Item orbOfTesting; - public static Item weakBloodOrb; - public static Item apprenticeBloodOrb; - public static Item magicianBloodOrb; - public static Item energyBlaster; - public static Item energySword; - public static Item lavaCrystal; - public static Item waterSigil; - public static Item lavaSigil; - public static Item voidSigil; - //public static Item glassShard = new GlassShard(17009).setUnlocalizedName("glassShard"); - //public static Item bloodiedShard = new BloodiedShard(17010).setUnlocalizedName("bloodiedShard"); - public static Item blankSlate; - public static Item reinforcedSlate; - public static Item sacrificialDagger; - public static Item daggerOfSacrifice; - public static Item airSigil; - public static Item sigilOfTheFastMiner; - public static Item sigilOfElementalAffinity; - public static Item sigilOfHaste; - public static Item sigilOfHolding; - public static Item divinationSigil; -// public static Item elementalInkWater; -// public static Item elementalInkFire; -// public static Item elementalInkEarth; -// public static Item elementalInkAir; - public static Item waterScribeTool; - public static Item fireScribeTool; - public static Item earthScribeTool; - public static Item airScribeTool; - public static Item activationCrystal; - public static Item boundPickaxe; - public static Item boundAxe; - public static Item boundShovel; - public static Item boundHelmet; - public static Item boundPlate; - public static Item boundLeggings; - public static Item boundBoots; - public static Item weakBloodShard; - public static Item growthSigil; - //public static Item fireSpell; - public static Item blankSpell; - public static Item masterBloodOrb; - public static Item alchemyFlask; - public static Item standardBindingAgent; - public static Item mundanePowerCatalyst; - public static Item averagePowerCatalyst; - public static Item greaterPowerCatalyst; - public static Item mundaneLengtheningCatalyst; - public static Item averageLengtheningCatalyst; - public static Item greaterLengtheningCatalyst; - public static Item incendium; - public static Item magicales; - public static Item sanctus; - public static Item aether; - public static Item simpleCatalyst; - public static Item crepitous; - public static Item crystallos; - public static Item terrae; - public static Item aquasalus; - public static Item tennebrae; - public static Item demonBloodShard; - public static Item archmageBloodOrb; - public static Item sigilOfWind; - public static Item telepositionFocus; - public static Item enhancedTelepositionFocus; - public static Item reinforcedTelepositionFocus; - public static Item demonicTelepositionFocus; - public static Item imbuedSlate; - public static Item demonicSlate; - public static Item duskScribeTool; - public static Item sigilOfTheBridge; - public static Item armourInhibitor; - public static Item creativeFiller; - public static Item demonPlacer; - public static Item itemBloodRuneBlock; - public static Item weakFillingAgent; - public static Item standardFillingAgent; - public static Item enhancedFillingAgent; - public static Item weakBindingAgent; - public static Item itemRitualDiviner; - public static Item sanguineHelmet; - public static Item focusBloodBlast; - public static Item focusGravityWell; - public static Item sigilOfMagnetism; - public static Item itemKeyOfDiablo; - public static Item energyBazooka; - public static Item itemBloodLightSigil; - - public static Block testingBlock; - public static Block bloodStoneBrick; - public static Block largeBloodStoneBrick; -// public static Block lifeEssenceStill; -// public static Block lifeEssenceFlowing; - public static BlockAltar blockAltar; - public static BloodRune bloodRune; - public static SpeedRune speedRune; - public static EfficiencyRune efficiencyRune; - public static RuneOfSacrifice runeOfSacrifice; - public static RuneOfSelfSacrifice runeOfSelfSacrifice; - public static Block blockMasterStone; - public static Block ritualStone; - public static Block imperfectRitualStone; - public static Block bloodSocket; - public static Block emptySocket; - public static Block armourForge; - public static Block blockWritingTable; - public static Block blockHomHeart; - public static Block blockPedestal; - public static Block blockPlinth; - public static Block blockLifeEssence; - public static Block blockTeleposer; - public static Block spectralBlock; - public static Block blockConduit; - public static Block blockBloodLight; - public static Item bucketLife; public static Fluid lifeEssenceFluid; @@ -464,8 +238,17 @@ public class AlchemicalWizardry public static int blockConduitBlockID; public static int blockBloodLightBlockID; - public static void registerRenderInformation() {}; - public static void registerRenderThings() {}; + public static void registerRenderInformation() + { + } + + ; + + public static void registerRenderThings() + { + } + + ; // The instance of your mod that Forge uses. @Instance("AWWayofTime") @@ -479,146 +262,11 @@ public class AlchemicalWizardry public void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new LifeBucketHandler()); - Configuration config = new Configuration(event.getSuggestedConfigurationFile()); - config.load(); - testingBlockBlockID = config.getBlock("TestingBlock", 1400).getInt(); - lifeEssenceFlowingBlockID = config.getBlock("LifeEssenceFlowing", 1401).getInt(); - lifeEssenceStillBlockID = config.getBlock("LifeEssenceStill", 1402).getInt(); - blockAltarBlockID = config.getBlock("BloodAltar", 1403).getInt(); - bloodRuneBlockID = config.getBlock("BloodRune", 1404).getInt(); - speedRuneBlockID = config.getBlock("SpeedRune", 1405).getInt(); - efficiencyRuneBlockID = config.getBlock("EfficiencyRune", 1406).getInt(); - lifeEssenceFluidID = config.getBlock("LifeEssenceFluid", 1407).getInt(); - runeOfSacrificeBlockID = config.getBlock("RuneOfSacrifice", 1408).getInt(); - runeOfSelfSacrificeBlockID = config.getBlock("RuneOfSelfSacrifice", 1409).getInt(); - ritualStoneBlockID = config.getBlock("RitualStone", 1410).getInt(); - blockMasterStoneBlockID = config.getBlock("MasterStone", 1411).getInt(); - imperfectRitualStoneBlockID = config.getBlock("ImperfectRitualStone", 1412).getInt(); - emptySocketBlockID = config.getBlock("EmptySocket", 1413).getInt(); - bloodSocketBlockID = config.getBlock("BloodSocket", 1414).getInt(); - armourForgeBlockID = config.getBlock("ArmourForge", 1415).getInt(); - largeBloodStoneBrickBlockID = config.getBlock("LargeBloodStoneBrick", 1416).getInt(); - bloodStoneBrickBlockID = config.getBlock("BloodStoneBrick", 1417).getInt(); - blockWritingTableBlockID = config.getBlock("BlockWritingTable", 1418).getInt(); - blockHomHeartBlockID = config.getBlock("BlockHomHeart", 1419).getInt(); - blockPedestalBlockID = config.getBlock("BlockPedestal", 1420).getInt(); - blockPlinthBlockID = config.getBlock("BlockPlinth", 1421).getInt(); - blockTeleposerBlockID = config.getBlock("BlockTeleposer", 1422).getInt(); - spectralBlockBlockID = config.getBlock("SpectralBlock", 1423).getInt(); - blockBloodLightBlockID = config.getBlock("BloodLight", 1424).getInt(); - //blockConduitBlockID = config.getBlock("BlockConduit", 1424).getInt(); - //Items - weakBloodOrbItemID = config.getItem("WeakBloodOrb", 17000).getInt(); - energyBlasterItemID = config.getItem("EnergyBlaster", 17001).getInt(); - energySwordItemID = config.getItem("EnergySword", 17002).getInt(); - lavaCrystalItemID = config.getItem("LavaCrystal", 17003).getInt(); - waterSigilItemID = config.getItem("WaterSigil", 17004).getInt(); - lavaSigilItemID = config.getItem("LavaSigil", 17005).getInt(); - voidSigilItemID = config.getItem("VoidSigil", 17006).getInt(); - blankSlateItemID = config.getItem("BlankSlate", 17007).getInt(); - reinforcedSlateItemID = config.getItem("ReinforcedSlate", 17008).getInt(); - sacrificialDaggerItemID = config.getItem("SacrificialDagger", 17009).getInt(); - bucketLifeItemID = config.getItem("BucketLife", 17010).getInt(); - apprenticeBloodOrbItemID = config.getItem("ApprenticeBloodOrb", 17011).getInt(); - daggerOfSacrificeItemID = config.getItem("DaggerOfSacrifice", 17012).getInt(); - airSigilItemID = config.getItem("AirSigil", 17013).getInt(); - sigilOfTheFastMinerItemID = config.getItem("SigilOfTheFastMiner", 17014).getInt(); -// elementalInkWaterItemID = config.getItem("ElementalInkWater", 17015).getInt(); -// elementalInkFireItemID = config.getItem("ElementalInkFire", 17016).getInt(); -// elementalInkEarthItemID = config.getItem("ElementalInkEarth", 17017).getInt(); -// elementalInkAirItemID = config.getItem("ElementalInkAir", 17018).getInt(); - duskScribeToolItemID = config.getItem("DuskScribeTool", 17015).getInt(); - demonPlacerItemID = config.getItem("DemonPlacer", 17016).getInt(); - itemBloodRuneBlockItemID = config.getItem("ItemBloodRuneBlock", 17017).getInt(); - armourInhibitorItemID = config.getItem("ArmourInhibitor", 17018).getInt(); - divinationSigilItemID = config.getItem("DivinationSigin", 17019).getInt(); - waterScribeToolItemID = config.getItem("WaterScribeTool", 17020).getInt(); - fireScribeToolItemID = config.getItem("FireScribeTool", 17021).getInt(); - earthScribeToolItemID = config.getItem("EarthScribeTool", 17022).getInt(); - airScribeToolItemID = config.getItem("AirScribeTool", 17023).getInt(); - weakActivationCrystalItemID = config.getItem("WeakActivationCrystal", 17024).getInt(); - magicianBloodOrbItemID = config.getItem("MagicianBloodOrb", 17025).getInt(); - sigilOfElementalAffinityItemID = config.getItem("SigilOfElementalAffinity", 17026).getInt(); - sigilOfHasteItemID = config.getItem("SigilOfHaste", 17027).getInt(); - sigilOfHoldingItemID = config.getItem("SigilOfHolding", 17028).getInt(); - boundPickaxeItemID = config.getItem("BoundPickaxe", 17029).getInt(); - boundAxeItemID = config.getItem("BoundAxe", 17030).getInt(); - boundShovelItemID = config.getItem("BoundShovel", 17031).getInt(); - boundHelmetItemID = config.getItem("BoundHelmet", 17032).getInt(); - boundPlateItemID = config.getItem("BoundPlate", 17033).getInt(); - boundLeggingsItemID = config.getItem("BoundLeggings", 17034).getInt(); - boundBootsItemID = config.getItem("BoundBoots", 17035).getInt(); - weakBloodShardItemID = config.getItem("WeakBloodShard", 17036).getInt(); - growthSigilItemID = config.getItem("SigilOfGrowth", 17037).getInt(); - masterBloodOrbItemID = config.getItem("MasterBloodOrb", 17038).getInt(); - blankSpellItemID = config.getItem("BlankSpell", 17039).getInt(); - alchemyFlaskItemID = config.getItem("AlchemyFlask", 17040).getInt(); - standardBindingAgentItemID = config.getItem("StandardBindingAgent", 17041).getInt(); - mundanePowerCatalystItemID = config.getItem("MundanePowerCatalyst", 17042).getInt(); - averagePowerCatalystItemID = config.getItem("AveragePowerCatalyst", 17043).getInt(); - greaterPowerCatalystItemID = config.getItem("GreaterPowerCatalyst", 17044).getInt(); - mundaneLengtheningCatalystItemID = config.getItem("MundaneLengtheningCatalyst", 17045).getInt(); - averageLengtheningCatalystItemID = config.getItem("AverageLengtheningCatalyst", 17046).getInt(); - greaterLengtheningCatalystItemID = config.getItem("GreaterLengtheningCatalyst", 17047).getInt(); - demonBloodShardItemID = config.getItem("DemonBloodShard", 17048).getInt(); - archmageBloodOrbItemID = config.getItem("ArchmageBloodOrb", 17049).getInt(); - sigilOfWindItemID = config.getItem("SigilOfWind", 17050).getInt(); - telepositionFocusItemID = config.getItem("TelepositionFocusItemID", 17051).getInt(); - enhancedTelepositionFocusItemID = config.getItem("EnhancedTelepositionFocus", 17052).getInt(); - reinforcedTelepositionFocusItemID = config.getItem("ReinforcedTelepositionFocus", 17053).getInt(); - demonicTelepositionFocusItemID = config.getItem("DemonicTelepositionFocus", 17054).getInt(); - imbuedSlateItemID = config.getItem("ImbuedSlate", 17055).getInt(); - demonicSlateItemID = config.getItem("DemonicSlate", 17056).getInt(); - sigilOfTheBridgeItemID = config.getItem("SigilOfTheBridge", 17057).getInt(); - creativeFillerItemID = config.getItem("CreativeFiller", 17058).getInt(); - itemRitualDivinerItemID = config.getItem("ItemRitualDiviner", 17059).getInt(); - itemKeyOfDiabloItemID = config.getItem("ItemKeyOfDiablo", 17081).getInt(); - energyBazookaItemID = config.getItem("EnergyBazooka", 17082).getInt(); - itemBloodLightSigilItemID = config.getItem("BloodLightSigil", 17083).getInt(); - simpleCatalystItemID = config.getItem("SimpleCatalyst", 17060).getInt(); - incendiumItemID = config.getItem("Incendium", 17061).getInt(); - magicalesItemID = config.getItem("Magicales", 17062).getInt(); - sanctusItemID = config.getItem("Sanctus", 17063).getInt(); - aetherItemID = config.getItem("Aether", 17064).getInt(); - crepitousItemID = config.getItem("Crepitous", 17065).getInt(); - crystallosItemID = config.getItem("Crystallos", 17066).getInt(); - terraeItemID = config.getItem("Terrae", 17067).getInt(); - aquasalusItemID = config.getItem("Aquasalus", 17068).getInt(); - tennebraeItemID = config.getItem("Tennebrae", 17069).getInt(); - weakBindingAgentItemID = config.getItem("WeakBindingAgent", 17070).getInt(); - weakFillingAgentItemID = config.getItem("WeakFillingAgent", 17072).getInt(); - standardFillingAgentItemID = config.getItem("StandardFillingAgent", 17073).getInt(); - enhancedFillingAgentItemID = config.getItem("EnhancedFillingAgent", 17074).getInt(); - sanguineHelmetItemID = config.getItem("SanguineHelmet", 17075).getInt(); - focusBloodBlastItemID = config.getItem("FocusBloodBlast", 17076).getInt(); - focusGravityWellItemID = config.getItem("FocusGravityWell", 17077).getInt(); - sigilOfMagnetismItemID = config.getItem("SigilOfMagnetism", 17080).getInt(); + BloodMagicConfiguration.init(new File(event.getModConfigurationDirectory(), "bloodMagic.cfg")); + //Custom config stuff goes here - this.standardBindingAgentDungeonChance = config.get("Dungeon Loot Chances", "standardBindingAgent", 30).getInt(); - this.mundanePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundanePowerCatalyst", 20).getInt(); - this.averagePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "averagePowerCatalyst", 10).getInt(); - this.greaterPowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterPowerCatalyst", 05).getInt(); - this.mundaneLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundaneLengtheningCatalyst", 20).getInt(); - this.averageLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "averageLengtheningCatalyst", 10).getInt(); - this.greaterLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterLengtheningCatalyst", 05).getInt(); - customPotionDrowningID = config.get("Potion ID", "Drowning", 100).getInt(); - customPotionBoostID = config.get("Potion ID", "Boost", 101).getInt(); - customPotionProjProtID = config.get("Potion ID", "ProjProt", 102).getInt(); - customPotionInhibitID = config.get("Potion ID", "Inhibit", 103).getInt(); - customPotionFlightID = config.get("Potion ID", "Flight", 104).getInt(); - customPotionReciprocationID = config.get("Potion ID", "Reciprocation", 105).getInt(); - //TODO - MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt(); - this.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true); - this.diamondMeteorArray = config.get("meteor", "diamondMeteor", new String[] {"oreDiamond", "100", "oreEmerald", "75", "oreCinnabar", "200", "oreAmber", "200"}).getStringList(); - this.diamondMeteorRadius = config.get("meteor", "diamondMeteorRadius", 5).getInt(); - this.stoneMeteorArray = config.get("meteor", "stoneBlockMeteor", new String[] {"oreCoal", "150", "oreApatite", "50", "oreIron", "50"}).getStringList(); - this.stoneMeteorRadius = config.get("meteor", "stoneMeteorRadius", 16).getInt(); - this.ironBlockMeteorArray = config.get("meteor", "ironBlockMeteor", new String[] {"oreIron", "400", "oreGold", "30", "oreCopper", "200", "oreTin", "140", "oreSilver", "70", "oreLead", "80", "oreLapis", "60", "oreRedstone", "100"}).getStringList(); - this.ironBlockMeteorRadius = config.get("meteor", "ironBlockMeteorRadius", 7).getInt(); - this.netherStarMeteorArray = config.get("meteor", "netherStarMeteor", new String[] {"oreDiamond", "150", "oreEmerald", "100", "oreQuartz", "250", "oreSunstone", "5", "oreMoonstone", "50", "oreIridium", "5", "oreCertusQuartz", "150"}).getStringList(); - this.netherStarMeteorRadius = config.get("meteor", "netherStarMeteorRadius", 3).getInt(); - config.save(); + + Potion[] potionTypes = null; for (Field f : Potion.class.getDeclaredFields()) @@ -632,13 +280,12 @@ public class AlchemicalWizardry Field modfield = Field.class.getDeclaredField("modifiers"); modfield.setAccessible(true); modfield.setInt(f, f.getModifiers() & ~Modifier.FINAL); - potionTypes = (Potion[])f.get(null); + potionTypes = (Potion[]) f.get(null); final Potion[] newPotionTypes = new Potion[256]; System.arraycopy(potionTypes, 0, newPotionTypes, 0, potionTypes.length); f.set(null, newPotionTypes); } - } - catch (Exception e) + } catch (Exception e) { System.err.println("Severe error, please report this to the mod author:"); System.err.println(e); @@ -654,115 +301,22 @@ public class AlchemicalWizardry int craftingConstant = OreDictionary.WILDCARD_VALUE; TickRegistry.registerTickHandler(new AlchemicalWizardryTickHandler(), Side.SERVER); //orbOfTesting = new OrbOfTesting(17000); - weakBloodOrb = new EnergyBattery(weakBloodOrbItemID, 5000).setUnlocalizedName("weakBloodOrb"); - apprenticeBloodOrb = new ApprenticeBloodOrb(apprenticeBloodOrbItemID, 25000).setUnlocalizedName("apprenticeBloodOrb"); - magicianBloodOrb = new MagicianBloodOrb(magicianBloodOrbItemID, 150000).setUnlocalizedName("magicianBloodOrb"); - masterBloodOrb = new MasterBloodOrb(masterBloodOrbItemID, 1000000).setUnlocalizedName("masterBloodOrb"); - archmageBloodOrb = new ArchmageBloodOrb(archmageBloodOrbItemID, 10000000).setUnlocalizedName("archmageBloodOrb"); - energyBlaster = new EnergyBlast(energyBlasterItemID).setUnlocalizedName("energyBlast"); - energySword = new EnergySword(energySwordItemID).setUnlocalizedName("energySword"); - lavaCrystal = new LavaCrystal(lavaCrystalItemID).setUnlocalizedName("lavaCrystal"); - waterSigil = new WaterSigil(waterSigilItemID).setUnlocalizedName("waterSigil"); - lavaSigil = new LavaSigil(lavaSigilItemID).setUnlocalizedName("lavaSigil"); - voidSigil = new VoidSigil(voidSigilItemID).setUnlocalizedName("voidSigil"); + //public final static Item glassShard = new GlassShard(17009).setUnlocalizedName("glassShard"); //public final static Item bloodiedShard = new BloodiedShard(17010).setUnlocalizedName("bloodiedShard"); - blankSlate = new AWBaseItems(blankSlateItemID).setUnlocalizedName("blankSlate"); - reinforcedSlate = new AWBaseItems(reinforcedSlateItemID).setUnlocalizedName("reinforcedSlate"); - sacrificialDagger = new SacrificialDagger(sacrificialDaggerItemID).setUnlocalizedName("sacrificialDagger"); - daggerOfSacrifice = new DaggerOfSacrifice(daggerOfSacrificeItemID).setUnlocalizedName("daggerOfSacrifice"); - airSigil = new AirSigil(airSigilItemID).setUnlocalizedName("airSigil"); - sigilOfTheFastMiner = new SigilOfTheFastMiner(sigilOfTheFastMinerItemID).setUnlocalizedName("sigilOfTheFastMiner"); - sigilOfElementalAffinity = new SigilOfElementalAffinity(sigilOfElementalAffinityItemID).setUnlocalizedName("sigilOfElementalAffinity"); - sigilOfHaste = new SigilOfHaste(sigilOfHasteItemID).setUnlocalizedName("sigilOfHaste"); - sigilOfHolding = new SigilOfHolding(sigilOfHoldingItemID).setUnlocalizedName("sigilOfHolding"); - divinationSigil = new DivinationSigil(divinationSigilItemID).setUnlocalizedName("divinationSigil"); + // elementalInkWater = new WaterInk(elementalInkWaterItemID).setUnlocalizedName("waterInk"); // elementalInkFire = new FireInk(elementalInkFireItemID).setUnlocalizedName("fireInk"); // elementalInkEarth = new EarthInk(elementalInkEarthItemID).setUnlocalizedName("earthInk"); // elementalInkAir = new AirInk(elementalInkAirItemID).setUnlocalizedName("airInk"); - waterScribeTool = new WaterScribeTool(waterScribeToolItemID).setUnlocalizedName("waterScribeTool"); - fireScribeTool = new FireScribeTool(fireScribeToolItemID).setUnlocalizedName("fireScribeTool"); - earthScribeTool = new EarthScribeTool(earthScribeToolItemID).setUnlocalizedName("earthScribeTool"); - airScribeTool = new AirScribeTool(airScribeToolItemID).setUnlocalizedName("airScribeTool"); - activationCrystal = new ActivationCrystal(weakActivationCrystalItemID); - boundPickaxe = new BoundPickaxe(boundPickaxeItemID).setUnlocalizedName("boundPickaxe"); - boundAxe = new BoundAxe(boundAxeItemID).setUnlocalizedName("boundAxe"); - boundShovel = new BoundShovel(boundShovelItemID).setUnlocalizedName("boundShovel"); - boundHelmet = new BoundArmour(boundHelmetItemID, 0).setUnlocalizedName("boundHelmet"); - boundPlate = new BoundArmour(boundPlateItemID, 1).setUnlocalizedName("boundPlate"); - boundLeggings = new BoundArmour(boundLeggingsItemID, 2).setUnlocalizedName("boundLeggings"); - boundBoots = new BoundArmour(boundBootsItemID, 3).setUnlocalizedName("boundBoots"); - weakBloodShard = new BloodShard(weakBloodShardItemID).setUnlocalizedName("weakBloodShard"); - growthSigil = new SigilOfGrowth(growthSigilItemID).setUnlocalizedName("growthSigil"); + //fireSpell = new SpellFireBurst(fireSpellItemID).setUnlocalizedName("fireSpell"); - blankSpell = new BlankSpell(blankSpellItemID).setUnlocalizedName("blankSpell"); - alchemyFlask = new AlchemyFlask(alchemyFlaskItemID).setUnlocalizedName("alchemyFlask"); - standardBindingAgent = new StandardBindingAgent(standardBindingAgentItemID).setUnlocalizedName("standardBindingAgent"); - mundanePowerCatalyst = new MundanePowerCatalyst(mundanePowerCatalystItemID).setUnlocalizedName("mundanePowerCatalyst"); - averagePowerCatalyst = new AveragePowerCatalyst(averagePowerCatalystItemID).setUnlocalizedName("averagePowerCatalyst"); - greaterPowerCatalyst = new GreaterPowerCatalyst(greaterPowerCatalystItemID).setUnlocalizedName("greaterPowerCatalyst"); - mundaneLengtheningCatalyst = new MundaneLengtheningCatalyst(mundaneLengtheningCatalystItemID).setUnlocalizedName("mundaneLengtheningCatalyst"); - averageLengtheningCatalyst = new AverageLengtheningCatalyst(averageLengtheningCatalystItemID).setUnlocalizedName("averageLengtheningCatalyst"); - greaterLengtheningCatalyst = new GreaterLengtheningCatalyst(greaterLengtheningCatalystItemID).setUnlocalizedName("greaterLengtheningCatalyst"); - incendium = new AlchemyReagent(incendiumItemID).setUnlocalizedName("incendium"); - magicales = new AlchemyReagent(magicalesItemID).setUnlocalizedName("magicales"); - sanctus = new AlchemyReagent(sanctusItemID).setUnlocalizedName("sanctus"); - aether = new AlchemyReagent(aetherItemID).setUnlocalizedName("aether"); - simpleCatalyst = new AlchemyReagent(simpleCatalystItemID).setUnlocalizedName("simpleCatalyst"); - crepitous = new AlchemyReagent(crepitousItemID).setUnlocalizedName("crepitous"); - crystallos = new AlchemyReagent(crystallosItemID).setUnlocalizedName("crystallos"); - terrae = new AlchemyReagent(terraeItemID).setUnlocalizedName("terrae"); - aquasalus = new AlchemyReagent(aquasalusItemID).setUnlocalizedName("aquasalus"); - tennebrae = new AlchemyReagent(tennebraeItemID).setUnlocalizedName("tennebrae"); - demonBloodShard = new BloodShard(demonBloodShardItemID).setUnlocalizedName("demonBloodShard"); - sigilOfWind = new SigilOfWind(sigilOfWindItemID).setUnlocalizedName("sigilOfWind"); - telepositionFocus = new TelepositionFocus(telepositionFocusItemID, 1).setUnlocalizedName("telepositionFocus"); - enhancedTelepositionFocus = new EnhancedTelepositionFocus(enhancedTelepositionFocusItemID).setUnlocalizedName("enhancedTelepositionFocus"); - reinforcedTelepositionFocus = new ReinforcedTelepositionFocus(reinforcedTelepositionFocusItemID).setUnlocalizedName("reinforcedTelepositionFocus"); - demonicTelepositionFocus = new DemonicTelepositionFocus(demonicTelepositionFocusItemID).setUnlocalizedName("demonicTelepositionFocus"); - imbuedSlate = new AWBaseItems(imbuedSlateItemID).setUnlocalizedName("imbuedSlate"); - demonicSlate = new AWBaseItems(demonicSlateItemID).setUnlocalizedName("demonicSlate"); - duskScribeTool = new DuskScribeTool(duskScribeToolItemID).setUnlocalizedName("duskScribeTool"); - sigilOfTheBridge = new SigilOfTheBridge(sigilOfTheBridgeItemID).setUnlocalizedName("sigilOfTheBridge"); - armourInhibitor = new ArmourInhibitor(armourInhibitorItemID).setUnlocalizedName("armourInhibitor"); - creativeFiller = new CheatyItem(creativeFillerItemID).setUnlocalizedName("cheatyItem"); - demonPlacer = new DemonPlacer(demonPlacerItemID).setUnlocalizedName("demonPlacer"); - weakFillingAgent = new WeakFillingAgent(weakFillingAgentItemID).setUnlocalizedName("weakFillingAgent"); - standardFillingAgent = new StandardFillingAgent(standardFillingAgentItemID).setUnlocalizedName("standardFillingAgent"); - enhancedFillingAgent = new EnhancedFillingAgent(enhancedFillingAgentItemID).setUnlocalizedName("enhancedFillingAgent"); - weakBindingAgent = new WeakBindingAgent(weakBindingAgentItemID).setUnlocalizedName("weakBindingAgent"); - itemRitualDiviner = new ItemRitualDiviner(itemRitualDivinerItemID).setUnlocalizedName("ritualDiviner"); - sigilOfMagnetism = new SigilOfMagnetism(sigilOfMagnetismItemID).setUnlocalizedName("sigilOfMagnetism"); - itemKeyOfDiablo = new ItemDiabloKey(itemKeyOfDiabloItemID).setUnlocalizedName("itemDiabloKey"); - energyBazooka = new EnergyBazooka(energyBazookaItemID).setUnlocalizedName("energyBazooka"); - itemBloodLightSigil = new ItemBloodLightSigil(itemBloodLightSigilItemID).setUnlocalizedName("bloodLightSigil"); + + ModItems.init(); + ModBlocks.init(); + //blocks - testingBlock = new TestingBlock(testingBlockBlockID, Material.ground).setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setCreativeTab(CreativeTabs.tabBlock).setLightValue(1.0F); -// lifeEssenceStill = new LifeEssenceStill(lifeEssenceStillBlockID); -// lifeEssenceFlowing = new LifeEssenceFlowing(lifeEssenceFlowingBlockID); - blockAltar = new BlockAltar(blockAltarBlockID); - bloodRune = new BloodRune(bloodRuneBlockID); - speedRune = new SpeedRune(speedRuneBlockID); - efficiencyRune = new EfficiencyRune(efficiencyRuneBlockID); - runeOfSacrifice = new RuneOfSacrifice(runeOfSacrificeBlockID); - runeOfSelfSacrifice = new RuneOfSelfSacrifice(runeOfSelfSacrificeBlockID); - lifeEssenceFluid = new LifeEssence("Life Essence"); - blockTeleposer = new BlockTeleposer(blockTeleposerBlockID); - spectralBlock = new SpectralBlock(spectralBlockBlockID); - ritualStone = new RitualStone(ritualStoneBlockID); - blockMasterStone = new BlockMasterStone(blockMasterStoneBlockID); - imperfectRitualStone = new ImperfectRitualStone(imperfectRitualStoneBlockID); - bloodSocket = new BlockSocket(bloodSocketBlockID); - armourForge = new ArmourForge(armourForgeBlockID); - emptySocket = new EmptySocket(emptySocketBlockID); - largeBloodStoneBrick = new LargeBloodStoneBrick(largeBloodStoneBrickBlockID); - bloodStoneBrick = new BloodStoneBrick(bloodStoneBrickBlockID); - blockWritingTable = new BlockWritingTable(blockWritingTableBlockID); - blockHomHeart = new BlockHomHeart(blockHomHeartBlockID); - blockPedestal = new BlockPedestal(blockPedestalBlockID); - blockPlinth = new BlockPlinth(blockPlinthBlockID); - blockBloodLight = new BlockBloodLightSource(blockBloodLightBlockID); + //blockConduit = new BlockConduit(blockConduitBlockID); proxy.registerRenderers(); proxy.registerEntities(); @@ -796,64 +350,64 @@ public class AlchemicalWizardry ItemStack glowstoneDustStack = new ItemStack(Item.glowstone); ItemStack saplingStack = new ItemStack(Block.sapling); ItemStack reedStack = new ItemStack(Item.reed); - ItemStack blankSlateStack = new ItemStack(blankSlate, 1, craftingConstant); + ItemStack blankSlateStack = new ItemStack(ModItems.blankSlate, 1, craftingConstant); //ItemStack glassShardStack = new ItemStack(glassShard); - ItemStack weakBloodOrbStackCrafted = new ItemStack(weakBloodOrb); + ItemStack weakBloodOrbStackCrafted = new ItemStack(ModItems.weakBloodOrb); //ItemStack bloodiedShardStack = new ItemStack(bloodiedShard); - ItemStack reinforcedSlateStack = new ItemStack(reinforcedSlate, 1, craftingConstant); - ItemStack weakBloodOrbStack = new ItemStack(weakBloodOrb, 1, craftingConstant); - ItemStack imbuedSlateStack = new ItemStack(this.imbuedSlate, 1, craftingConstant); - ItemStack demonSlateStack = new ItemStack(this.demonicSlate, 1, craftingConstant); - ItemStack apprenticeBloodOrbStack = new ItemStack(apprenticeBloodOrb, 1, craftingConstant); - ItemStack magicianBloodOrbStack = new ItemStack(magicianBloodOrb, 1, craftingConstant); - ItemStack waterSigilStackCrafted = new ItemStack(waterSigil); - ItemStack lavaSigilStackCrafted = new ItemStack(lavaSigil); - ItemStack voidSigilStackCrafted = new ItemStack(voidSigil); - ItemStack airSigilStack = new ItemStack(airSigil); - ItemStack lavaCrystalStackCrafted = new ItemStack(lavaCrystal); - ItemStack lavaCrystalStack = new ItemStack(lavaCrystal); - ItemStack energySwordStack = new ItemStack(energySword); - ItemStack energyBlasterStack = new ItemStack(energyBlaster); - ItemStack sacrificialDaggerStack = new ItemStack(sacrificialDagger); - ItemStack bloodAltarStack = new ItemStack(blockAltar); - ItemStack bloodRuneCraftedStack = new ItemStack(bloodRune, 1); - ItemStack bloodRuneStack = new ItemStack(bloodRune); - ItemStack speedRuneStack = new ItemStack(speedRune); - ItemStack efficiencyRuneStack = new ItemStack(efficiencyRune); - ItemStack runeOfSacrificeStack = new ItemStack(runeOfSacrifice); - ItemStack runeOfSelfSacrificeStack = new ItemStack(runeOfSelfSacrifice); - ItemStack miningSigilStackCrafted = new ItemStack(sigilOfTheFastMiner); - ItemStack divinationSigilStackCrafted = new ItemStack(divinationSigil); + ItemStack reinforcedSlateStack = new ItemStack(ModItems.reinforcedSlate, 1, craftingConstant); + ItemStack weakBloodOrbStack = new ItemStack(ModItems.weakBloodOrb, 1, craftingConstant); + ItemStack imbuedSlateStack = new ItemStack(ModItems.imbuedSlate, 1, craftingConstant); + ItemStack demonSlateStack = new ItemStack(ModItems.demonicSlate, 1, craftingConstant); + ItemStack apprenticeBloodOrbStack = new ItemStack(ModItems.apprenticeBloodOrb, 1, craftingConstant); + ItemStack magicianBloodOrbStack = new ItemStack(ModItems.magicianBloodOrb, 1, craftingConstant); + ItemStack waterSigilStackCrafted = new ItemStack(ModItems.waterSigil); + ItemStack lavaSigilStackCrafted = new ItemStack(ModItems.lavaSigil); + ItemStack voidSigilStackCrafted = new ItemStack(ModItems.voidSigil); + ItemStack airSigilStack = new ItemStack(ModItems.airSigil); + ItemStack lavaCrystalStackCrafted = new ItemStack(ModItems.lavaCrystal); + ItemStack lavaCrystalStack = new ItemStack(ModItems.lavaCrystal); + ItemStack energySwordStack = new ItemStack(ModItems.energySword); + ItemStack energyBlasterStack = new ItemStack(ModItems.energyBlaster); + ItemStack sacrificialDaggerStack = new ItemStack(ModItems.sacrificialDagger); + ItemStack bloodAltarStack = new ItemStack(ModBlocks.blockAltar); + ItemStack bloodRuneCraftedStack = new ItemStack(ModBlocks.bloodRune, 1); + ItemStack bloodRuneStack = new ItemStack(ModBlocks.bloodRune); + ItemStack speedRuneStack = new ItemStack(ModBlocks.speedRune); + ItemStack efficiencyRuneStack = new ItemStack(ModBlocks.efficiencyRune); + ItemStack runeOfSacrificeStack = new ItemStack(ModBlocks.runeOfSacrifice); + ItemStack runeOfSelfSacrificeStack = new ItemStack(ModBlocks.runeOfSelfSacrifice); + ItemStack miningSigilStackCrafted = new ItemStack(ModItems.sigilOfTheFastMiner); + ItemStack divinationSigilStackCrafted = new ItemStack(ModItems.divinationSigil); // ItemStack elementalInkWaterStack = new ItemStack(elementalInkWater); // ItemStack elementalInkFireStack = new ItemStack(elementalInkFire); // ItemStack elementalInkEarthStack = new ItemStack(elementalInkEarth); // ItemStack elementalInkAirStack = new ItemStack(elementalInkAir); - ItemStack waterScribeToolStack = new ItemStack(waterScribeTool); - ItemStack fireScribeToolStack = new ItemStack(fireScribeTool); - ItemStack earthScribeToolStack = new ItemStack(earthScribeTool); - ItemStack airScribeToolStack = new ItemStack(airScribeTool); - ItemStack ritualStoneStackCrafted = new ItemStack(ritualStone, 4); - ItemStack ritualStoneStack = new ItemStack(ritualStone); - ItemStack masterRitualStoneStack = new ItemStack(blockMasterStone); - ItemStack imperfectRitualStoneStack = new ItemStack(imperfectRitualStone); - ItemStack sigilOfElementalAffinityStackCrafted = new ItemStack(sigilOfElementalAffinity); - ItemStack lavaSigilStack = new ItemStack(lavaSigil); - ItemStack waterSigilStack = new ItemStack(waterSigil); - ItemStack sigilOfHoldingStack = new ItemStack(sigilOfHolding); - ItemStack weakBloodShardStack = new ItemStack(weakBloodShard); - ItemStack emptySocketStack = new ItemStack(emptySocket); - ItemStack bloodSocketStack = new ItemStack(bloodSocket); - ItemStack armourForgeStack = new ItemStack(armourForge); - ItemStack largeBloodStoneBrickStackCrafted = new ItemStack(largeBloodStoneBrick, 32); - ItemStack largeBloodStoneBrickStack = new ItemStack(largeBloodStoneBrick); - ItemStack bloodStoneBrickStackCrafted = new ItemStack(bloodStoneBrick, 4); - ItemStack growthSigilStack = new ItemStack(growthSigil); - ItemStack blockHomHeartStack = new ItemStack(blockHomHeart); + ItemStack waterScribeToolStack = new ItemStack(ModItems.waterScribeTool); + ItemStack fireScribeToolStack = new ItemStack(ModItems.fireScribeTool); + ItemStack earthScribeToolStack = new ItemStack(ModItems.earthScribeTool); + ItemStack airScribeToolStack = new ItemStack(ModItems.airScribeTool); + ItemStack ritualStoneStackCrafted = new ItemStack(ModBlocks.ritualStone, 4); + ItemStack ritualStoneStack = new ItemStack(ModBlocks.ritualStone); + ItemStack masterRitualStoneStack = new ItemStack(ModBlocks.blockMasterStone); + ItemStack imperfectRitualStoneStack = new ItemStack(ModBlocks.imperfectRitualStone); + ItemStack sigilOfElementalAffinityStackCrafted = new ItemStack(ModItems.sigilOfElementalAffinity); + ItemStack lavaSigilStack = new ItemStack(ModItems.lavaSigil); + ItemStack waterSigilStack = new ItemStack(ModItems.waterSigil); + ItemStack sigilOfHoldingStack = new ItemStack(ModItems.sigilOfHolding); + ItemStack weakBloodShardStack = new ItemStack(ModItems.weakBloodShard); + ItemStack emptySocketStack = new ItemStack(ModBlocks.emptySocket); + ItemStack bloodSocketStack = new ItemStack(ModBlocks.bloodSocket); + ItemStack armourForgeStack = new ItemStack(ModBlocks.armourForge); + ItemStack largeBloodStoneBrickStackCrafted = new ItemStack(ModBlocks.largeBloodStoneBrick, 32); + ItemStack largeBloodStoneBrickStack = new ItemStack(ModBlocks.largeBloodStoneBrick); + ItemStack bloodStoneBrickStackCrafted = new ItemStack(ModBlocks.bloodStoneBrick, 4); + ItemStack growthSigilStack = new ItemStack(ModItems.growthSigil); + ItemStack blockHomHeartStack = new ItemStack(ModBlocks.blockHomHeart); ItemStack redWoolStack = new ItemStack(Block.cloth, 1, 14); ItemStack zombieHead = new ItemStack(Item.skull, 1, 2); - ItemStack simpleCatalystStack = new ItemStack(simpleCatalyst); - ItemStack duskRitualDivinerStack = new ItemStack(this.itemRitualDiviner); - ((ItemRitualDiviner)duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1); + ItemStack simpleCatalystStack = new ItemStack(ModItems.simpleCatalyst); + ItemStack duskRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner); + ((ItemRitualDiviner) duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1); //weakBloodOrbStackCrafted.setItemDamage(weakBloodOrbStackCrafted.getMaxDamage()); waterSigilStackCrafted.setItemDamage(waterSigilStackCrafted.getMaxDamage()); lavaSigilStackCrafted.setItemDamage(lavaSigilStackCrafted.getMaxDamage()); @@ -861,16 +415,16 @@ public class AlchemicalWizardry lavaCrystalStackCrafted.setItemDamage(lavaCrystalStackCrafted.getMaxDamage()); miningSigilStackCrafted.setItemDamage(miningSigilStackCrafted.getMaxDamage()); sigilOfElementalAffinityStackCrafted.setItemDamage(sigilOfElementalAffinityStackCrafted.getMaxDamage()); - ItemStack archmageBloodOrbStack = new ItemStack(AlchemicalWizardry.archmageBloodOrb); - ItemStack sanctusStack = new ItemStack(this.sanctus); - ItemStack aetherStack = new ItemStack(this.aether); - ItemStack terraeStack = new ItemStack(this.terrae); - ItemStack incendiumStack = new ItemStack(this.incendium); - ItemStack tennebraeStack = new ItemStack(this.tennebrae); - ItemStack aquasalusStack = new ItemStack(this.aquasalus); - ItemStack crystallosStack = new ItemStack(this.crystallos); - ItemStack crepitousStack = new ItemStack(this.crepitous); - ItemStack magicalesStack = new ItemStack(this.magicales); + ItemStack archmageBloodOrbStack = new ItemStack(ModItems.archmageBloodOrb); + ItemStack sanctusStack = new ItemStack(ModItems.sanctus); + ItemStack aetherStack = new ItemStack(ModItems.aether); + ItemStack terraeStack = new ItemStack(ModItems.terrae); + ItemStack incendiumStack = new ItemStack(ModItems.incendium); + ItemStack tennebraeStack = new ItemStack(ModItems.tennebrae); + ItemStack aquasalusStack = new ItemStack(ModItems.aquasalus); + ItemStack crystallosStack = new ItemStack(ModItems.crystallos); + ItemStack crepitousStack = new ItemStack(ModItems.crepitous); + ItemStack magicalesStack = new ItemStack(ModItems.magicales); //All crafting goes here // GameRegistry.addRecipe(orbOfTestingStack, "x x", " ", "x x", 'x', cobblestoneStack); //GameRegistry.addRecipe(glassShardStack, " x", "y ", 'x', ironStack, 'y', glassStack); @@ -888,9 +442,9 @@ public class AlchemicalWizardry GameRegistry.addRecipe(bloodRuneCraftedStack, "sss", "ror", "sss", 's', stoneStack, 'o', weakBloodOrbStack, 'r', blankSlateStack); GameRegistry.addRecipe(speedRuneStack, "sbs", "uru", "sbs", 'u', sugarStack, 's', stoneStack, 'r', bloodRuneStack, 'b', blankSlateStack); //GameRegistry.addRecipe(efficiencyRuneStack, "sbs", "rur", "sbs", 'r', redstoneStack, 's', stoneStack, 'u', bloodRuneStack,'b',blankSlateStack); - GameRegistry.addRecipe(new ItemStack(this.bloodRune, 1, 1), "sbs", "bob", "srs", 's', stoneStack, 'o', magicianBloodOrbStack, 'b', emptyBucketStack, 'r', new ItemStack(this.imbuedSlate)); - GameRegistry.addRecipe(new ItemStack(this.bloodRune, 1, 2), "sbs", "bob", "srs", 's', stoneStack, 'o', magicianBloodOrbStack, 'b', waterBucketStack, 'r', new ItemStack(this.imbuedSlate)); - GameRegistry.addRecipe(new ItemStack(this.bloodRune, 1, 3), "sws", "ror", "sws", 's', stoneStack, 'o', new ItemStack(this.masterBloodOrb), 'w', weakBloodOrbStack, 'r', new ItemStack(this.demonicSlate)); + GameRegistry.addRecipe(new ItemStack(ModBlocks.bloodRune, 1, 1), "sbs", "bob", "srs", 's', stoneStack, 'o', magicianBloodOrbStack, 'b', emptyBucketStack, 'r', new ItemStack(ModItems.imbuedSlate)); + GameRegistry.addRecipe(new ItemStack(ModBlocks.bloodRune, 1, 2), "sbs", "bob", "srs", 's', stoneStack, 'o', magicianBloodOrbStack, 'b', waterBucketStack, 'r', new ItemStack(ModItems.imbuedSlate)); + GameRegistry.addRecipe(new ItemStack(ModBlocks.bloodRune, 1, 3), "sws", "ror", "sws", 's', stoneStack, 'o', new ItemStack(ModItems.masterBloodOrb), 'w', weakBloodOrbStack, 'r', new ItemStack(ModItems.demonicSlate)); GameRegistry.addRecipe(airSigilStack, "fgf", "fsf", "fof", 'f', featherStack, 'g', ghastTearStack, 's', reinforcedSlateStack, 'o', apprenticeBloodOrbStack); GameRegistry.addRecipe(miningSigilStackCrafted, "sps", "hra", "sos", 'o', apprenticeBloodOrbStack, 's', stoneStack, 'p', ironPickaxeStack, 'h', ironShovelStack, 'a', ironAxeStack, 'r', reinforcedSlateStack); GameRegistry.addRecipe(runeOfSacrificeStack, "srs", "gog", "srs", 's', stoneStack, 'g', goldIngotStack, 'o', apprenticeBloodOrbStack, 'r', reinforcedSlateStack); @@ -914,24 +468,24 @@ public class AlchemicalWizardry GameRegistry.addShapelessRecipe(new ItemStack(Item.skull, 1, 2), new ItemStack(Item.skull, 1, 1), new ItemStack(Item.rottenFlesh), new ItemStack(Item.ingotIron), new ItemStack(Item.leather)); GameRegistry.addShapelessRecipe(new ItemStack(Item.skull, 1, 0), new ItemStack(Item.skull, 1, 1), new ItemStack(Item.bow, 1, 0), new ItemStack(Item.arrow, 1, 0), new ItemStack(Item.bone)); GameRegistry.addShapelessRecipe(new ItemStack(Item.skull, 1, 4), new ItemStack(Item.skull, 1, 1), new ItemStack(Item.gunpowder), new ItemStack(Block.dirt), new ItemStack(Block.sand)); - GameRegistry.addRecipe(new ItemStack(this.blockWritingTable), " s ", "ror", 's', new ItemStack(Item.brewingStand), 'r', obsidianStack, 'o', weakBloodOrbStack); - GameRegistry.addRecipe(new ItemStack(this.blockPedestal), "ooo", " c ", "ooo", 'o', obsidianStack, 'c', weakBloodShardStack); - GameRegistry.addRecipe(new ItemStack(this.blockPlinth), "iii", " p ", "iii", 'i', ironBlockStack, 'p', new ItemStack(this.blockPedestal)); - GameRegistry.addShapelessRecipe(new ItemStack(this.alchemyFlask, 1, 0), new ItemStack(this.alchemyFlask, 1, craftingConstant), new ItemStack(Item.netherStalkSeeds), redstoneStack, glowstoneDustStack); - GameRegistry.addRecipe(new ItemStack(this.sigilOfHaste), "csc", "sts", "ror", 'c', new ItemStack(Item.cookie), 's', new ItemStack(Item.sugar), 't', demonicSlate, 'r', obsidianStack, 'o', new ItemStack(this.masterBloodOrb)); - GameRegistry.addRecipe(new ItemStack(this.sigilOfWind), "faf", "grg", "fof", 'f', featherStack, 'g', ghastTearStack, 'a', new ItemStack(this.airSigil), 'o', new ItemStack(this.masterBloodOrb), 'r', demonicSlate); - GameRegistry.addShapelessRecipe(new ItemStack(this.weakBloodShard, 5, 0), new ItemStack(this.masterBloodOrb), new ItemStack(this.weakBloodShard), imbuedSlateStack); - GameRegistry.addRecipe(new ItemStack(this.blockTeleposer), "ggg", "efe", "ggg", 'g', goldIngotStack, 'f', new ItemStack(this.telepositionFocus), 'e', new ItemStack(Item.enderPearl)); - GameRegistry.addShapelessRecipe(new ItemStack(this.reinforcedTelepositionFocus), new ItemStack(this.enhancedTelepositionFocus), new ItemStack(this.weakBloodShard)); - GameRegistry.addShapelessRecipe(new ItemStack(this.demonicTelepositionFocus), new ItemStack(this.reinforcedTelepositionFocus), new ItemStack(this.demonBloodShard)); - GameRegistry.addRecipe(new ItemStack(this.sigilOfTheBridge), "nnn", "nsn", "ror", 'n', stoneStack, 'r', new ItemStack(Block.slowSand), 's', imbuedSlateStack, 'o', magicianBloodOrbStack); - GameRegistry.addRecipe(new ItemStack(this.armourInhibitor), " gg", "gsg", "gg ", 'g', goldIngotStack, 's', new ItemStack(this.weakBloodShard)); - GameRegistry.addRecipe(new ItemStack(this.itemRitualDiviner), "d1d", "2e3", "d4d", '1', new ItemStack(this.airScribeTool), '2', new ItemStack(this.waterScribeTool), '3', new ItemStack(this.fireScribeTool), '4', new ItemStack(this.earthScribeTool), 'd', diamondStack, 'e', new ItemStack(Item.emerald)); - GameRegistry.addRecipe(duskRitualDivinerStack, " d ", "srs", " d ", 'd', new ItemStack(this.duskScribeTool), 's', new ItemStack(this.demonicSlate), 'r', new ItemStack(this.itemRitualDiviner)); - GameRegistry.addRecipe(new ItemStack(AlchemicalWizardry.sigilOfMagnetism), "bgb", "gsg", "bob", 'b', new ItemStack(Block.blockIron), 'g', goldIngotStack, 's', new ItemStack(this.imbuedSlate), 'o', magicianBloodOrbStack); - GameRegistry.addRecipe(new ItemStack(AlchemicalWizardry.energyBazooka), "Ocd", "cb ", "d w", 'O', archmageBloodOrbStack, 'c', crepitousStack, 'b', new ItemStack(AlchemicalWizardry.energyBlaster), 'd', diamondStack, 'w', new ItemStack(AlchemicalWizardry.weakBloodShard)); - GameRegistry.addRecipe(new ItemStack(AlchemicalWizardry.itemBloodLightSigil), "btb", "sss", "bob", 'o', magicianBloodOrbStack, 'b', glowstoneBlockStack, 't', new ItemStack(Block.torchWood), 's', imbuedSlateStack); - GameRegistry.addRecipe(new ItemStack(AlchemicalWizardry.itemKeyOfDiablo), " gw", "gdg", "wg ", 'w', weakBloodShardStack, 'g', goldIngotStack, 'd', diamondStack); + GameRegistry.addRecipe(new ItemStack(ModBlocks.blockWritingTable), " s ", "ror", 's', new ItemStack(Item.brewingStand), 'r', obsidianStack, 'o', weakBloodOrbStack); + GameRegistry.addRecipe(new ItemStack(ModBlocks.blockPedestal), "ooo", " c ", "ooo", 'o', obsidianStack, 'c', weakBloodShardStack); + GameRegistry.addRecipe(new ItemStack(ModBlocks.blockPlinth), "iii", " p ", "iii", 'i', ironBlockStack, 'p', new ItemStack(ModBlocks.blockPedestal)); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.alchemyFlask, 1, 0), new ItemStack(ModItems.alchemyFlask, 1, craftingConstant), new ItemStack(Item.netherStalkSeeds), redstoneStack, glowstoneDustStack); + GameRegistry.addRecipe(new ItemStack(ModItems.sigilOfHaste), "csc", "sts", "ror", 'c', new ItemStack(Item.cookie), 's', new ItemStack(Item.sugar), 't', ModItems.demonicSlate, 'r', obsidianStack, 'o', new ItemStack(ModItems.masterBloodOrb)); + GameRegistry.addRecipe(new ItemStack(ModItems.sigilOfWind), "faf", "grg", "fof", 'f', featherStack, 'g', ghastTearStack, 'a', new ItemStack(ModItems.airSigil), 'o', new ItemStack(ModItems.masterBloodOrb), 'r', ModItems.demonicSlate); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.weakBloodShard, 5, 0), new ItemStack(ModItems.masterBloodOrb), new ItemStack(ModItems.weakBloodShard), imbuedSlateStack); + GameRegistry.addRecipe(new ItemStack(ModBlocks.blockTeleposer), "ggg", "efe", "ggg", 'g', goldIngotStack, 'f', new ItemStack(ModItems.telepositionFocus), 'e', new ItemStack(Item.enderPearl)); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.reinforcedTelepositionFocus), new ItemStack(ModItems.enhancedTelepositionFocus), new ItemStack(ModItems.weakBloodShard)); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.demonicTelepositionFocus), new ItemStack(ModItems.reinforcedTelepositionFocus), new ItemStack(ModItems.demonBloodShard)); + GameRegistry.addRecipe(new ItemStack(ModItems.sigilOfTheBridge), "nnn", "nsn", "ror", 'n', stoneStack, 'r', new ItemStack(Block.slowSand), 's', imbuedSlateStack, 'o', magicianBloodOrbStack); + GameRegistry.addRecipe(new ItemStack(ModItems.armourInhibitor), " gg", "gsg", "gg ", 'g', goldIngotStack, 's', new ItemStack(ModItems.weakBloodShard)); + GameRegistry.addRecipe(new ItemStack(ModItems.itemRitualDiviner), "d1d", "2e3", "d4d", '1', new ItemStack(ModItems.airScribeTool), '2', new ItemStack(ModItems.waterScribeTool), '3', new ItemStack(ModItems.fireScribeTool), '4', new ItemStack(ModItems.earthScribeTool), 'd', diamondStack, 'e', new ItemStack(Item.emerald)); + GameRegistry.addRecipe(duskRitualDivinerStack, " d ", "srs", " d ", 'd', new ItemStack(ModItems.duskScribeTool), 's', new ItemStack(ModItems.demonicSlate), 'r', new ItemStack(ModItems.itemRitualDiviner)); + GameRegistry.addRecipe(new ItemStack(ModItems.sigilOfMagnetism), "bgb", "gsg", "bob", 'b', new ItemStack(Block.blockIron), 'g', goldIngotStack, 's', new ItemStack(ModItems.imbuedSlate), 'o', magicianBloodOrbStack); + GameRegistry.addRecipe(new ItemStack(ModItems.energyBazooka), "Ocd", "cb ", "d w", 'O', archmageBloodOrbStack, 'c', crepitousStack, 'b', new ItemStack(ModItems.energyBlaster), 'd', diamondStack, 'w', new ItemStack(ModItems.weakBloodShard)); + GameRegistry.addRecipe(new ItemStack(ModItems.itemBloodLightSigil), "btb", "sss", "bob", 'o', magicianBloodOrbStack, 'b', glowstoneBlockStack, 't', new ItemStack(Block.torchWood), 's', imbuedSlateStack); + GameRegistry.addRecipe(new ItemStack(ModItems.itemKeyOfDiablo), " gw", "gdg", "wg ", 'w', weakBloodShardStack, 'g', goldIngotStack, 'd', diamondStack); customPotionDrowning = (new PotionDrowning(customPotionDrowningID, true, 0)).setIconIndex(0, 0).setPotionName("Drowning"); customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost"); customPotionProjProt = (new PotionProjectileProtect(customPotionProjProtID, false, 0)).setIconIndex(0, 0).setPotionName("Whirlwind"); @@ -940,106 +494,106 @@ public class AlchemicalWizardry customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation"); //All items registered go here //LanguageRegistry.addName(orbOfTesting, "Orb of Testing"); - LanguageRegistry.addName(weakBloodOrb, "Weak Blood Orb"); - LanguageRegistry.addName(apprenticeBloodOrb, "Apprentice Blood Orb"); - LanguageRegistry.addName(magicianBloodOrb, "Magician's Blood Orb"); - LanguageRegistry.addName(archmageBloodOrb, "Archmage's Blood Orb"); - LanguageRegistry.addName(energyBlaster, "Energy Blaster"); - LanguageRegistry.addName(energySword, "Bound Blade"); - LanguageRegistry.addName(lavaCrystal, "Lava Crystal"); - LanguageRegistry.addName(waterSigil, "Water Sigil"); - LanguageRegistry.addName(lavaSigil, "Lava Sigil"); - LanguageRegistry.addName(voidSigil, "Void Sigil"); + LanguageRegistry.addName(ModItems.weakBloodOrb, "Weak Blood Orb"); + LanguageRegistry.addName(ModItems.apprenticeBloodOrb, "Apprentice Blood Orb"); + LanguageRegistry.addName(ModItems.magicianBloodOrb, "Magician's Blood Orb"); + LanguageRegistry.addName(ModItems.archmageBloodOrb, "Archmage's Blood Orb"); + LanguageRegistry.addName(ModItems.energyBlaster, "Energy Blaster"); + LanguageRegistry.addName(ModItems.energySword, "Bound Blade"); + LanguageRegistry.addName(ModItems.lavaCrystal, "Lava Crystal"); + LanguageRegistry.addName(ModItems.waterSigil, "Water Sigil"); + LanguageRegistry.addName(ModItems.lavaSigil, "Lava Sigil"); + LanguageRegistry.addName(ModItems.voidSigil, "Void Sigil"); //LanguageRegistry.addName(glassShard, "Glass Shard"); //LanguageRegistry.addName(bloodiedShard, "Bloodied Shard"); - LanguageRegistry.addName(blankSlate, "Blank Slate"); - LanguageRegistry.addName(reinforcedSlate, "Reinforced Slate"); - LanguageRegistry.addName(sacrificialDagger, "Sacrificial Knife"); - LanguageRegistry.addName(daggerOfSacrifice, "Dagger of Sacrifice"); - LanguageRegistry.addName(airSigil, "Air Sigil"); - LanguageRegistry.addName(sigilOfTheFastMiner, "Sigil of the Fast Miner"); - LanguageRegistry.addName(sigilOfElementalAffinity, "Sigil of Elemental Affinity"); - LanguageRegistry.addName(sigilOfHaste, "Sigil of Haste"); - LanguageRegistry.addName(sigilOfHolding, "Sigil of Holding"); - LanguageRegistry.addName(growthSigil, "Sigil of the Green Grove"); + LanguageRegistry.addName(ModItems.blankSlate, "Blank Slate"); + LanguageRegistry.addName(ModItems.reinforcedSlate, "Reinforced Slate"); + LanguageRegistry.addName(ModItems.sacrificialDagger, "Sacrificial Knife"); + LanguageRegistry.addName(ModItems.daggerOfSacrifice, "Dagger of Sacrifice"); + LanguageRegistry.addName(ModItems.airSigil, "Air Sigil"); + LanguageRegistry.addName(ModItems.sigilOfTheFastMiner, "Sigil of the Fast Miner"); + LanguageRegistry.addName(ModItems.sigilOfElementalAffinity, "Sigil of Elemental Affinity"); + LanguageRegistry.addName(ModItems.sigilOfHaste, "Sigil of Haste"); + LanguageRegistry.addName(ModItems.sigilOfHolding, "Sigil of Holding"); + LanguageRegistry.addName(ModItems.growthSigil, "Sigil of the Green Grove"); // LanguageRegistry.addName(elementalInkWater, "Elemental Ink: Water"); // LanguageRegistry.addName(elementalInkFire, "Elemental Ink: Fire"); // LanguageRegistry.addName(elementalInkEarth, "Elemental Ink: Earth"); // LanguageRegistry.addName(elementalInkAir, "Elemental Ink: Air"); - LanguageRegistry.addName(divinationSigil, "Divination Sigil"); - LanguageRegistry.addName(new ItemStack(activationCrystal, 1, 0), "Weak Activation Crystal"); - LanguageRegistry.addName(new ItemStack(activationCrystal, 1, 1), "Awakened Activation Crystal"); - LanguageRegistry.addName(waterScribeTool, "Elemental Inscription Tool: Water"); - LanguageRegistry.addName(fireScribeTool, "Elemental Inscription Tool: Fire"); - LanguageRegistry.addName(earthScribeTool, "Elemental Inscription Tool: Earth"); - LanguageRegistry.addName(airScribeTool, "Elemental Inscription Tool: Air"); - LanguageRegistry.addName(boundPickaxe, "Bound Pickaxe"); - LanguageRegistry.addName(boundAxe, "Bound Axe"); - LanguageRegistry.addName(boundShovel, "Bound Shovel"); - LanguageRegistry.addName(boundHelmet, "Bound Helmet"); - LanguageRegistry.addName(boundPlate, "Bound Chestplate"); - LanguageRegistry.addName(boundLeggings, "Bound Leggings"); - LanguageRegistry.addName(boundBoots, "Bound Boots"); - LanguageRegistry.addName(weakBloodShard, "Weak Blood Shard"); - LanguageRegistry.addName(blankSpell, "Unbound Crystal"); - LanguageRegistry.addName(masterBloodOrb, "Master Blood Orb"); - LanguageRegistry.addName(alchemyFlask, "Potion Flask"); - LanguageRegistry.addName(mundanePowerCatalyst, "Mundane Power Catalyst"); - LanguageRegistry.addName(averagePowerCatalyst, "Average Power Catalyst"); - LanguageRegistry.addName(greaterPowerCatalyst, "Greater Power Catalyst"); - LanguageRegistry.addName(mundaneLengtheningCatalyst, "Mundane Lengthening Catalyst"); - LanguageRegistry.addName(averageLengtheningCatalyst, "Average Lengthening Catalyst"); - LanguageRegistry.addName(greaterLengtheningCatalyst, "Greater Lengthening Catalyst"); - LanguageRegistry.addName(standardBindingAgent, "Standard Binding Agent"); - LanguageRegistry.addName(incendium, "Incendium"); - LanguageRegistry.addName(magicales, "Magicales"); - LanguageRegistry.addName(sanctus, "Sanctus"); - LanguageRegistry.addName(aether, "Aether"); - LanguageRegistry.addName(simpleCatalyst, "Simple Catalyst"); - LanguageRegistry.addName(crepitous, "Crepitous"); - LanguageRegistry.addName(crystallos, "Crystallos"); - LanguageRegistry.addName(terrae, "Terrae"); - LanguageRegistry.addName(aquasalus, "Aquasalus"); - LanguageRegistry.addName(tennebrae, "Tennebrae"); - LanguageRegistry.addName(sigilOfWind, "Sigil of the Whirlwind"); - LanguageRegistry.addName(telepositionFocus, "Teleposition Focus"); - LanguageRegistry.addName(enhancedTelepositionFocus, "Enhanced Teleposition Focus"); - LanguageRegistry.addName(reinforcedTelepositionFocus, "Reinforced Teleposition Focus"); - LanguageRegistry.addName(demonicTelepositionFocus, "Demonic Teleposition Focus"); - LanguageRegistry.addName(imbuedSlate, "Imbued Slate"); - LanguageRegistry.addName(demonicSlate, "Demonic Slate"); - LanguageRegistry.addName(duskScribeTool, "Elemental Inscription Tool: Dusk"); - LanguageRegistry.addName(sigilOfTheBridge, "Sigil of the Phantom Bridge"); - LanguageRegistry.addName(armourInhibitor, "Armour Inhibitor"); - LanguageRegistry.addName(creativeFiller, "Orb of Testing"); - LanguageRegistry.addName(weakFillingAgent, "Weak Filling Agent"); - LanguageRegistry.addName(standardFillingAgent, "Standard Filling Agent"); - LanguageRegistry.addName(enhancedFillingAgent, "Enhanced Filling Agent"); - LanguageRegistry.addName(weakBindingAgent, "Weak Binding Agent"); - LanguageRegistry.addName(itemRitualDiviner, "Ritual Diviner"); - LanguageRegistry.addName(sigilOfMagnetism, "Sigil of Magnetism"); - LanguageRegistry.addName(itemKeyOfDiablo, "Key of Binding"); - LanguageRegistry.addName(energyBazooka, "Energy Bazooka"); - LanguageRegistry.addName(itemBloodLightSigil, "Sigil of the Blood Lamp"); - LanguageRegistry.addName(demonBloodShard, "Demon Blood Shard"); + LanguageRegistry.addName(ModItems.divinationSigil, "Divination Sigil"); + LanguageRegistry.addName(new ItemStack(ModItems.activationCrystal, 1, 0), "Weak Activation Crystal"); + LanguageRegistry.addName(new ItemStack(ModItems.activationCrystal, 1, 1), "Awakened Activation Crystal"); + LanguageRegistry.addName(ModItems.waterScribeTool, "Elemental Inscription Tool: Water"); + LanguageRegistry.addName(ModItems.fireScribeTool, "Elemental Inscription Tool: Fire"); + LanguageRegistry.addName(ModItems.earthScribeTool, "Elemental Inscription Tool: Earth"); + LanguageRegistry.addName(ModItems.airScribeTool, "Elemental Inscription Tool: Air"); + LanguageRegistry.addName(ModItems.boundPickaxe, "Bound Pickaxe"); + LanguageRegistry.addName(ModItems.boundAxe, "Bound Axe"); + LanguageRegistry.addName(ModItems.boundShovel, "Bound Shovel"); + LanguageRegistry.addName(ModItems.boundHelmet, "Bound Helmet"); + LanguageRegistry.addName(ModItems.boundPlate, "Bound Chestplate"); + LanguageRegistry.addName(ModItems.boundLeggings, "Bound Leggings"); + LanguageRegistry.addName(ModItems.boundBoots, "Bound Boots"); + LanguageRegistry.addName(ModItems.weakBloodShard, "Weak Blood Shard"); + LanguageRegistry.addName(ModItems.blankSpell, "Unbound Crystal"); + LanguageRegistry.addName(ModItems.masterBloodOrb, "Master Blood Orb"); + LanguageRegistry.addName(ModItems.alchemyFlask, "Potion Flask"); + LanguageRegistry.addName(ModItems.mundanePowerCatalyst, "Mundane Power Catalyst"); + LanguageRegistry.addName(ModItems.averagePowerCatalyst, "Average Power Catalyst"); + LanguageRegistry.addName(ModItems.greaterPowerCatalyst, "Greater Power Catalyst"); + LanguageRegistry.addName(ModItems.mundaneLengtheningCatalyst, "Mundane Lengthening Catalyst"); + LanguageRegistry.addName(ModItems.averageLengtheningCatalyst, "Average Lengthening Catalyst"); + LanguageRegistry.addName(ModItems.greaterLengtheningCatalyst, "Greater Lengthening Catalyst"); + LanguageRegistry.addName(ModItems.standardBindingAgent, "Standard Binding Agent"); + LanguageRegistry.addName(ModItems.incendium, "Incendium"); + LanguageRegistry.addName(ModItems.magicales, "Magicales"); + LanguageRegistry.addName(ModItems.sanctus, "Sanctus"); + LanguageRegistry.addName(ModItems.aether, "Aether"); + LanguageRegistry.addName(ModItems.simpleCatalyst, "Simple Catalyst"); + LanguageRegistry.addName(ModItems.crepitous, "Crepitous"); + LanguageRegistry.addName(ModItems.crystallos, "Crystallos"); + LanguageRegistry.addName(ModItems.terrae, "Terrae"); + LanguageRegistry.addName(ModItems.aquasalus, "Aquasalus"); + LanguageRegistry.addName(ModItems.tennebrae, "Tennebrae"); + LanguageRegistry.addName(ModItems.sigilOfWind, "Sigil of the Whirlwind"); + LanguageRegistry.addName(ModItems.telepositionFocus, "Teleposition Focus"); + LanguageRegistry.addName(ModItems.enhancedTelepositionFocus, "Enhanced Teleposition Focus"); + LanguageRegistry.addName(ModItems.reinforcedTelepositionFocus, "Reinforced Teleposition Focus"); + LanguageRegistry.addName(ModItems.demonicTelepositionFocus, "Demonic Teleposition Focus"); + LanguageRegistry.addName(ModItems.imbuedSlate, "Imbued Slate"); + LanguageRegistry.addName(ModItems.demonicSlate, "Demonic Slate"); + LanguageRegistry.addName(ModItems.duskScribeTool, "Elemental Inscription Tool: Dusk"); + LanguageRegistry.addName(ModItems.sigilOfTheBridge, "Sigil of the Phantom Bridge"); + LanguageRegistry.addName(ModItems.armourInhibitor, "Armour Inhibitor"); + LanguageRegistry.addName(ModItems.creativeFiller, "Orb of Testing"); + LanguageRegistry.addName(ModItems.weakFillingAgent, "Weak Filling Agent"); + LanguageRegistry.addName(ModItems.standardFillingAgent, "Standard Filling Agent"); + LanguageRegistry.addName(ModItems.enhancedFillingAgent, "Enhanced Filling Agent"); + LanguageRegistry.addName(ModItems.weakBindingAgent, "Weak Binding Agent"); + LanguageRegistry.addName(ModItems.itemRitualDiviner, "Ritual Diviner"); + LanguageRegistry.addName(ModItems.sigilOfMagnetism, "Sigil of Magnetism"); + LanguageRegistry.addName(ModItems.itemKeyOfDiablo, "Key of Binding"); + LanguageRegistry.addName(ModItems.energyBazooka, "Energy Bazooka"); + LanguageRegistry.addName(ModItems.itemBloodLightSigil, "Sigil of the Blood Lamp"); + LanguageRegistry.addName(ModItems.demonBloodShard, "Demon Blood Shard"); //FluidStack lifeEssenceFluidStack = new FluidStack(lifeEssenceFluid, 1); //LiquidStack lifeEssence = new LiquidStack(lifeEssenceFlowing, 1); //LiquidDictionary.getOrCreateLiquid("Life Essence", lifeEssence); FluidRegistry.registerFluid(lifeEssenceFluid); - blockLifeEssence = new LifeEssenceBlock(lifeEssenceFluidID); - blockLifeEssence.setUnlocalizedName("lifeEssenceBlock"); - bucketLife = (new LifeBucket(bucketLifeItemID, blockLifeEssence.blockID)).setUnlocalizedName("bucketLife").setContainerItem(Item.bucketEmpty).setCreativeTab(CreativeTabs.tabMisc); + ModBlocks.blockLifeEssence = new LifeEssenceBlock(lifeEssenceFluidID); + ModBlocks.blockLifeEssence.setUnlocalizedName("lifeEssenceBlock"); + bucketLife = (new LifeBucket(bucketLifeItemID, ModBlocks.blockLifeEssence.blockID)).setUnlocalizedName("bucketLife").setContainerItem(Item.bucketEmpty).setCreativeTab(CreativeTabs.tabMisc); FluidContainerRegistry.registerFluidContainer(lifeEssenceFluid, new ItemStack(bucketLife), FluidContainerRegistry.EMPTY_BUCKET); //lifeEssenceFluid.setUnlocalizedName("lifeEssence"); //LiquidContainerRegistry.registerLiquid(new LiquidContainerData(LiquidDictionary.getLiquid("Life Essence", LiquidContainerRegistry.BUCKET_VOLUME), new ItemStack(AlchemicalWizardry.bucketLife), new ItemStack(Item.bucketEmpty))); //GameRegistry.registerBlock(testingBlock, "testingBlock"); //LanguageRegistry.addName(testingBlock, "Testing Block"); //MinecraftForge.setBlockHarvestLevel(testingBlock, "pickaxe", 0); - GameRegistry.registerBlock(blockAltar, "bloodAltar"); - LanguageRegistry.addName(blockAltar, "Blood Altar"); - GameRegistry.registerBlock(blockLifeEssence, "lifeEssence"); - LanguageRegistry.addName(blockLifeEssence, "Life Essence"); - MinecraftForge.setBlockHarvestLevel(blockAltar, "pickaxe", 1); + GameRegistry.registerBlock(ModBlocks.blockAltar, "bloodAltar"); + LanguageRegistry.addName(ModBlocks.blockAltar, "Blood Altar"); + GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence"); + LanguageRegistry.addName(ModBlocks.blockLifeEssence, "Life Essence"); + MinecraftForge.setBlockHarvestLevel(ModBlocks.blockAltar, "pickaxe", 1); //Register Tile Entity GameRegistry.registerTileEntity(TEAltar.class, "containerAltar"); GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone"); @@ -1051,72 +605,72 @@ public class AlchemicalWizardry GameRegistry.registerTileEntity(TETeleposer.class, "containerTeleposer"); GameRegistry.registerTileEntity(TEConduit.class, "containerConduit"); // - GameRegistry.registerBlock(bloodRune, ItemBloodRuneBlock.class, "AlchemicalWizardry" + (bloodRune.getUnlocalizedName().substring(5))); - LanguageRegistry.addName(new ItemStack(bloodRune, 1, 0), "Blood Rune"); - LanguageRegistry.addName(new ItemStack(bloodRune, 1, 1), "Rune of Augmented Capacity"); - LanguageRegistry.addName(new ItemStack(bloodRune, 1, 2), "Rune of Dislocation"); - LanguageRegistry.addName(new ItemStack(bloodRune, 1, 3), "Rune of the Orb"); - GameRegistry.registerBlock(speedRune, "speedRune"); - LanguageRegistry.addName(speedRune, "Speed Rune"); - GameRegistry.registerBlock(efficiencyRune, "efficiencyRune"); - LanguageRegistry.addName(efficiencyRune, "Efficiency Rune"); - GameRegistry.registerBlock(runeOfSacrifice, "runeOfSacrifice"); - LanguageRegistry.addName(runeOfSacrifice, "Rune of Sacrifice"); - GameRegistry.registerBlock(runeOfSelfSacrifice, "runeOfSelfSacrifice"); - LanguageRegistry.addName(runeOfSelfSacrifice, "Rune of Self-sacrifice"); + GameRegistry.registerBlock(ModBlocks.bloodRune, ItemBloodRuneBlock.class, "AlchemicalWizardry" + (ModBlocks.bloodRune.getUnlocalizedName().substring(5))); + LanguageRegistry.addName(new ItemStack(ModBlocks.bloodRune, 1, 0), "Blood Rune"); + LanguageRegistry.addName(new ItemStack(ModBlocks.bloodRune, 1, 1), "Rune of Augmented Capacity"); + LanguageRegistry.addName(new ItemStack(ModBlocks.bloodRune, 1, 2), "Rune of Dislocation"); + LanguageRegistry.addName(new ItemStack(ModBlocks.bloodRune, 1, 3), "Rune of the Orb"); + GameRegistry.registerBlock(ModBlocks.speedRune, "speedRune"); + LanguageRegistry.addName(ModBlocks.speedRune, "Speed Rune"); + GameRegistry.registerBlock(ModBlocks.efficiencyRune, "efficiencyRune"); + LanguageRegistry.addName(ModBlocks.efficiencyRune, "Efficiency Rune"); + GameRegistry.registerBlock(ModBlocks.runeOfSacrifice, "runeOfSacrifice"); + LanguageRegistry.addName(ModBlocks.runeOfSacrifice, "Rune of Sacrifice"); + GameRegistry.registerBlock(ModBlocks.runeOfSelfSacrifice, "runeOfSelfSacrifice"); + LanguageRegistry.addName(ModBlocks.runeOfSelfSacrifice, "Rune of Self-sacrifice"); // GameRegistry.registerBlock(lifeEssenceStill, "lifeEssenceStill"); // GameRegistry.registerBlock(lifeEssenceFlowing, "lifeEssenceFlowing"); //LanguageRegistry.addName(lifeEssenceStill, "Life Essence"); LanguageRegistry.addName(bucketLife, "Bucket of Life"); - GameRegistry.registerBlock(ritualStone, "ritualStone"); - GameRegistry.registerBlock(blockMasterStone, "masterStone"); - GameRegistry.registerBlock(bloodSocket, "bloodSocket"); - LanguageRegistry.addName(blockMasterStone, "Master Ritual Stone"); - GameRegistry.registerBlock(imperfectRitualStone, "imperfectRitualStone"); - LanguageRegistry.addName(imperfectRitualStone, "Imperfect Ritual Stone"); - LanguageRegistry.addName(ritualStone, "Ritual Stone"); - LanguageRegistry.addName(armourForge, "Soul Armour Forge"); - LanguageRegistry.addName(emptySocket, "Empty Socket"); - LanguageRegistry.addName(bloodSocket, "Filled Socket"); - LanguageRegistry.addName(bloodStoneBrick, "Bloodstone Brick"); - LanguageRegistry.addName(largeBloodStoneBrick, "Large Bloodstone Brick"); - LanguageRegistry.addName(blockHomHeart, "Spell Table"); - LanguageRegistry.addName(blockPedestal, "Arcane Pedestal"); - LanguageRegistry.addName(blockPlinth, "Arcane Plinth"); - LanguageRegistry.addName(blockWritingTable, "Alchemic Chemistry Set"); - LanguageRegistry.addName(blockTeleposer, "Teleposer"); - LanguageRegistry.addName(spectralBlock, "Spectral Block"); - LanguageRegistry.addName(blockBloodLight, "Blood Light"); - GameRegistry.registerBlock(armourForge, "armourForge"); - GameRegistry.registerBlock(emptySocket, "emptySocket"); - GameRegistry.registerBlock(bloodStoneBrick, "bloodStoneBrick"); - GameRegistry.registerBlock(largeBloodStoneBrick, "largeBloodStoneBrick"); - GameRegistry.registerBlock(blockWritingTable, "blockWritingTable"); - GameRegistry.registerBlock(blockHomHeart, "blockHomHeart"); - GameRegistry.registerBlock(blockPedestal, "blockPedestal"); - GameRegistry.registerBlock(blockPlinth, "blockPlinth"); - GameRegistry.registerBlock(blockTeleposer, "blockTeleposer"); - GameRegistry.registerBlock(spectralBlock, "spectralBlock"); - GameRegistry.registerBlock(blockBloodLight, "bloodLight"); + GameRegistry.registerBlock(ModBlocks.ritualStone, "ritualStone"); + GameRegistry.registerBlock(ModBlocks.blockMasterStone, "masterStone"); + GameRegistry.registerBlock(ModBlocks.bloodSocket, "bloodSocket"); + LanguageRegistry.addName(ModBlocks.blockMasterStone, "Master Ritual Stone"); + GameRegistry.registerBlock(ModBlocks.imperfectRitualStone, "imperfectRitualStone"); + LanguageRegistry.addName(ModBlocks.imperfectRitualStone, "Imperfect Ritual Stone"); + LanguageRegistry.addName(ModBlocks.ritualStone, "Ritual Stone"); + LanguageRegistry.addName(ModBlocks.armourForge, "Soul Armour Forge"); + LanguageRegistry.addName(ModBlocks.emptySocket, "Empty Socket"); + LanguageRegistry.addName(ModBlocks.bloodSocket, "Filled Socket"); + LanguageRegistry.addName(ModBlocks.bloodStoneBrick, "Bloodstone Brick"); + LanguageRegistry.addName(ModBlocks.largeBloodStoneBrick, "Large Bloodstone Brick"); + LanguageRegistry.addName(ModBlocks.blockHomHeart, "Spell Table"); + LanguageRegistry.addName(ModBlocks.blockPedestal, "Arcane Pedestal"); + LanguageRegistry.addName(ModBlocks.blockPlinth, "Arcane Plinth"); + LanguageRegistry.addName(ModBlocks.blockWritingTable, "Alchemic Chemistry Set"); + LanguageRegistry.addName(ModBlocks.blockTeleposer, "Teleposer"); + LanguageRegistry.addName(ModBlocks.spectralBlock, "Spectral Block"); + LanguageRegistry.addName(ModBlocks.blockBloodLight, "Blood Light"); + GameRegistry.registerBlock(ModBlocks.armourForge, "armourForge"); + GameRegistry.registerBlock(ModBlocks.emptySocket, "emptySocket"); + GameRegistry.registerBlock(ModBlocks.bloodStoneBrick, "bloodStoneBrick"); + GameRegistry.registerBlock(ModBlocks.largeBloodStoneBrick, "largeBloodStoneBrick"); + GameRegistry.registerBlock(ModBlocks.blockWritingTable, "blockWritingTable"); + GameRegistry.registerBlock(ModBlocks.blockHomHeart, "blockHomHeart"); + GameRegistry.registerBlock(ModBlocks.blockPedestal, "blockPedestal"); + GameRegistry.registerBlock(ModBlocks.blockPlinth, "blockPlinth"); + GameRegistry.registerBlock(ModBlocks.blockTeleposer, "blockTeleposer"); + GameRegistry.registerBlock(ModBlocks.spectralBlock, "spectralBlock"); + GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight"); //GameRegistry.registerBlock(blockConduit,"blockConduit"); - MinecraftForge.setBlockHarvestLevel(bloodRune, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(speedRune, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(efficiencyRune, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(runeOfSacrifice, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(runeOfSelfSacrifice, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(ritualStone, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(bloodSocket, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(ritualStone, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(imperfectRitualStone, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(blockMasterStone, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(emptySocket, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(bloodStoneBrick, "pickaxe", 0); - MinecraftForge.setBlockHarvestLevel(largeBloodStoneBrick, "pickaxe", 0); - MinecraftForge.setBlockHarvestLevel(blockWritingTable, "pickaxe", 1); - MinecraftForge.setBlockHarvestLevel(blockHomHeart, "pickaxe", 1); - MinecraftForge.setBlockHarvestLevel(blockPedestal, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(blockPlinth, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(blockTeleposer, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.bloodRune, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.speedRune, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.efficiencyRune, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.runeOfSacrifice, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.runeOfSelfSacrifice, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.ritualStone, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.bloodSocket, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.ritualStone, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.imperfectRitualStone, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.blockMasterStone, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.emptySocket, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.bloodStoneBrick, "pickaxe", 0); + MinecraftForge.setBlockHarvestLevel(ModBlocks.largeBloodStoneBrick, "pickaxe", 0); + MinecraftForge.setBlockHarvestLevel(ModBlocks.blockWritingTable, "pickaxe", 1); + MinecraftForge.setBlockHarvestLevel(ModBlocks.blockHomHeart, "pickaxe", 1); + MinecraftForge.setBlockHarvestLevel(ModBlocks.blockPedestal, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.blockPlinth, "pickaxe", 2); + MinecraftForge.setBlockHarvestLevel(ModBlocks.blockTeleposer, "pickaxe", 2); //Fuel handler GameRegistry.registerFuelHandler(new AlchemicalWizardryFuelHandler()); //EntityRegistry.registerModEntity(EnergyBlastProjectile.class, "BlasterProj", 0, this, 128, 5, true); @@ -1129,9 +683,9 @@ public class AlchemicalWizardry ArmourForge.initializeRecipes(); TEPlinth.initialize(); AlchemicalPotionCreationHandler.initializePotions(); - MinecraftForge.setToolClass(boundPickaxe, "pickaxe", 5); - MinecraftForge.setToolClass(boundAxe, "axe", 5); - MinecraftForge.setToolClass(boundShovel, "shovel", 5); + MinecraftForge.setToolClass(ModItems.boundPickaxe, "pickaxe", 5); + MinecraftForge.setToolClass(ModItems.boundAxe, "axe", 5); + MinecraftForge.setToolClass(ModItems.boundShovel, "shovel", 5); MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent()); proxy.InitRendering(); NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler()); @@ -1142,52 +696,52 @@ public class AlchemicalWizardry // } // AlchemyRecipeRegistry.registerRecipe(glowstoneDustStack, 2, comp, 2); //TODO NEW RECIPES! - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.weakBindingAgent), 10, new ItemStack[] {simpleCatalystStack, simpleCatalystStack, new ItemStack(Item.clay)}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.standardBindingAgent), 15, new ItemStack[] {new ItemStack(this.weakBindingAgent), sanctusStack, new ItemStack(this.crystallos)}, 3); - AlchemyRecipeRegistry.registerRecipe(simpleCatalystStack, 2, new ItemStack[] {sugarStack, redstoneStack, redstoneStack, glowstoneDustStack, new ItemStack(Item.gunpowder)}, 1); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(AlchemicalWizardry.incendium), 5, new ItemStack[] {lavaBucketStack, new ItemStack(Item.blazePowder), new ItemStack(Item.blazePowder), new ItemStack(Block.netherrack), simpleCatalystStack}, 1); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(AlchemicalWizardry.aether), 5, new ItemStack[] {featherStack, featherStack, glowstoneDustStack, ghastTearStack, simpleCatalystStack}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.sanctus), 5, new ItemStack[] {glowstoneDustStack, new ItemStack(Item.goldNugget), glowstoneDustStack, glassStack, simpleCatalystStack}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.crepitous), 5, new ItemStack[] {new ItemStack(Item.gunpowder), new ItemStack(Item.gunpowder), cobblestoneStack, cobblestoneStack, simpleCatalystStack}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.crystallos), 5, new ItemStack[] {new ItemStack(Block.ice), new ItemStack(Block.ice), new ItemStack(Block.blockSnow), new ItemStack(Block.blockSnow), simpleCatalystStack}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.terrae), 5, new ItemStack[] {new ItemStack(Block.dirt), new ItemStack(Block.sand), obsidianStack, obsidianStack, simpleCatalystStack}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.aquasalus), 5, new ItemStack[] {simpleCatalystStack, new ItemStack(Item.dyePowder, 1, 0), new ItemStack(Item.potion, 1, 0), new ItemStack(Item.potion, 1, 0), new ItemStack(Item.potion, 1, 0)}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.tennebrae), 5, new ItemStack[] {simpleCatalystStack, new ItemStack(Item.coal), new ItemStack(Item.coal), new ItemStack(Block.obsidian), new ItemStack(Item.clay)}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.magicales), 5, new ItemStack[] {redstoneStack, simpleCatalystStack, new ItemStack(Item.gunpowder), new ItemStack(Item.glowstone), new ItemStack(Item.glowstone)}, 2); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.mundanePowerCatalyst), 10, new ItemStack[] {glowstoneDustStack, glowstoneDustStack, glowstoneDustStack, new ItemStack(this.weakBindingAgent), simpleCatalystStack}, 3); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.mundaneLengtheningCatalyst), 15, new ItemStack[] {redstoneStack, redstoneStack, redstoneStack, new ItemStack(this.weakBindingAgent), simpleCatalystStack}, 3); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.averagePowerCatalyst), 20, new ItemStack[] {new ItemStack(this.mundanePowerCatalyst), new ItemStack(this.mundanePowerCatalyst), new ItemStack(this.standardBindingAgent)}, 4); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.averageLengtheningCatalyst), 20, new ItemStack[] {new ItemStack(this.mundaneLengtheningCatalyst), new ItemStack(this.mundaneLengtheningCatalyst), new ItemStack(this.standardBindingAgent)}, 4); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.greaterPowerCatalyst), 30, new ItemStack[] {new ItemStack(this.averagePowerCatalyst), new ItemStack(this.averagePowerCatalyst), new ItemStack(this.incendium)}, 4); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.greaterLengtheningCatalyst), 30, new ItemStack[] {new ItemStack(this.averageLengtheningCatalyst), new ItemStack(this.averageLengtheningCatalyst), new ItemStack(this.aquasalus)}, 4); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.weakFillingAgent), 5, new ItemStack[] {simpleCatalystStack, new ItemStack(Item.netherStalkSeeds), redstoneStack, glowstoneDustStack}, 3); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.standardFillingAgent), 10, new ItemStack[] {new ItemStack(this.weakFillingAgent), new ItemStack(this.terrae)}, 3); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.enhancedFillingAgent), 25, new ItemStack[] {new ItemStack(this.standardFillingAgent), new ItemStack(aquasalus), new ItemStack(this.magicales)}, 4); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.activationCrystal, 1, 1), 100, new ItemStack[] {new ItemStack(this.activationCrystal, 1, 0), new ItemStack(this.demonBloodShard), incendiumStack, aquasalusStack, aetherStack}, 4); - AlchemyRecipeRegistry.registerRecipe(new ItemStack(this.activationCrystal, 1, 1), 100, new ItemStack[] {new ItemStack(this.activationCrystal, 1, 0), new ItemStack(Item.netherStar), incendiumStack, aquasalusStack, aetherStack}, 4); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.weakBindingAgent), 10, new ItemStack[]{simpleCatalystStack, simpleCatalystStack, new ItemStack(Item.clay)}, 2); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.standardBindingAgent), 15, new ItemStack[]{new ItemStack(ModItems.weakBindingAgent), sanctusStack, new ItemStack(ModItems.crystallos)}, 3); + AlchemyRecipeRegistry.registerRecipe(simpleCatalystStack, 2, new ItemStack[]{sugarStack, redstoneStack, redstoneStack, glowstoneDustStack, new ItemStack(Item.gunpowder)}, 1); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.incendium), 5, new ItemStack[]{lavaBucketStack, new ItemStack(Item.blazePowder), new ItemStack(Item.blazePowder), new ItemStack(Block.netherrack), simpleCatalystStack}, 1); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.aether), 5, new ItemStack[]{featherStack, featherStack, glowstoneDustStack, ghastTearStack, simpleCatalystStack}, 2); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.sanctus), 5, new ItemStack[]{glowstoneDustStack, new ItemStack(Item.goldNugget), glowstoneDustStack, glassStack, simpleCatalystStack}, 2); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.crepitous), 5, new ItemStack[]{new ItemStack(Item.gunpowder), new ItemStack(Item.gunpowder), cobblestoneStack, cobblestoneStack, simpleCatalystStack}, 2); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.crystallos), 5, new ItemStack[]{new ItemStack(Block.ice), new ItemStack(Block.ice), new ItemStack(Block.blockSnow), new ItemStack(Block.blockSnow), simpleCatalystStack}, 2); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.terrae), 5, new ItemStack[]{new ItemStack(Block.dirt), new ItemStack(Block.sand), obsidianStack, obsidianStack, simpleCatalystStack}, 2); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.aquasalus), 5, new ItemStack[]{simpleCatalystStack, new ItemStack(Item.dyePowder, 1, 0), new ItemStack(Item.potion, 1, 0), new ItemStack(Item.potion, 1, 0), new ItemStack(Item.potion, 1, 0)}, 2); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.tennebrae), 5, new ItemStack[]{simpleCatalystStack, new ItemStack(Item.coal), new ItemStack(Item.coal), new ItemStack(Block.obsidian), new ItemStack(Item.clay)}, 2); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.magicales), 5, new ItemStack[]{redstoneStack, simpleCatalystStack, new ItemStack(Item.gunpowder), new ItemStack(Item.glowstone), new ItemStack(Item.glowstone)}, 2); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.mundanePowerCatalyst), 10, new ItemStack[]{glowstoneDustStack, glowstoneDustStack, glowstoneDustStack, new ItemStack(ModItems.weakBindingAgent), simpleCatalystStack}, 3); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.mundaneLengtheningCatalyst), 15, new ItemStack[]{redstoneStack, redstoneStack, redstoneStack, new ItemStack(ModItems.weakBindingAgent), simpleCatalystStack}, 3); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.averagePowerCatalyst), 20, new ItemStack[]{new ItemStack(ModItems.mundanePowerCatalyst), new ItemStack(ModItems.mundanePowerCatalyst), new ItemStack(ModItems.standardBindingAgent)}, 4); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.averageLengtheningCatalyst), 20, new ItemStack[]{new ItemStack(ModItems.mundaneLengtheningCatalyst), new ItemStack(ModItems.mundaneLengtheningCatalyst), new ItemStack(ModItems.standardBindingAgent)}, 4); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.greaterPowerCatalyst), 30, new ItemStack[]{new ItemStack(ModItems.averagePowerCatalyst), new ItemStack(ModItems.averagePowerCatalyst), new ItemStack(ModItems.incendium)}, 4); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.greaterLengtheningCatalyst), 30, new ItemStack[]{new ItemStack(ModItems.averageLengtheningCatalyst), new ItemStack(ModItems.averageLengtheningCatalyst), new ItemStack(ModItems.aquasalus)}, 4); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.weakFillingAgent), 5, new ItemStack[]{simpleCatalystStack, new ItemStack(Item.netherStalkSeeds), redstoneStack, glowstoneDustStack}, 3); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.standardFillingAgent), 10, new ItemStack[]{new ItemStack(ModItems.weakFillingAgent), new ItemStack(ModItems.terrae)}, 3); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.enhancedFillingAgent), 25, new ItemStack[]{new ItemStack(ModItems.standardFillingAgent), new ItemStack(ModItems.aquasalus), new ItemStack(ModItems.magicales)}, 4); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.activationCrystal, 1, 1), 100, new ItemStack[]{new ItemStack(ModItems.activationCrystal, 1, 0), new ItemStack(ModItems.demonBloodShard), incendiumStack, aquasalusStack, aetherStack}, 4); + AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.activationCrystal, 1, 1), 100, new ItemStack[]{new ItemStack(ModItems.activationCrystal, 1, 0), new ItemStack(Item.netherStar), incendiumStack, aquasalusStack, aetherStack}, 4); HomSpellRegistry.registerBasicSpell(new ItemStack(Item.flintAndSteel), new SpellFireBurst()); HomSpellRegistry.registerBasicSpell(new ItemStack(Block.ice), new SpellFrozenWater()); HomSpellRegistry.registerBasicSpell(new ItemStack(Block.tnt), new SpellExplosions()); - HomSpellRegistry.registerBasicSpell(new ItemStack(AlchemicalWizardry.apprenticeBloodOrb), new SpellHolyBlast()); + HomSpellRegistry.registerBasicSpell(new ItemStack(ModItems.apprenticeBloodOrb), new SpellHolyBlast()); HomSpellRegistry.registerBasicSpell(new ItemStack(Item.ghastTear), new SpellWindGust()); HomSpellRegistry.registerBasicSpell(new ItemStack(Item.glowstone), new SpellLightningBolt()); HomSpellRegistry.registerBasicSpell(new ItemStack(Item.bucketWater), new SpellWateryGrave()); HomSpellRegistry.registerBasicSpell(new ItemStack(Block.obsidian), new SpellEarthBender()); HomSpellRegistry.registerBasicSpell(new ItemStack(Item.enderPearl), new SpellTeleport()); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityFallenAngelID), new ItemStack[] {sanctusStack, sanctusStack, sanctusStack, aetherStack, tennebraeStack, terraeStack}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityLowerGuardianID), new ItemStack[] {cobblestoneStack, cobblestoneStack, terraeStack, tennebraeStack, new ItemStack(Item.ingotIron), new ItemStack(Item.goldNugget)}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityBileDemonID), new ItemStack[] {new ItemStack(Item.poisonousPotato), tennebraeStack, terraeStack, new ItemStack(Item.porkRaw), new ItemStack(Item.egg), new ItemStack(Item.beefRaw)}, new ItemStack[] {crepitousStack, crepitousStack, terraeStack, ironBlockStack, ironBlockStack, diamondStack}, new ItemStack[] {}, 0, 5); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityWingedFireDemonID), new ItemStack[] {aetherStack, incendiumStack, incendiumStack, incendiumStack, tennebraeStack, new ItemStack(Block.netherrack)}, new ItemStack[] {diamondStack, new ItemStack(Block.blockGold), magicalesStack, magicalesStack, new ItemStack(Item.fireballCharge), new ItemStack(Block.coalBlock)}, new ItemStack[] {}, 0, 5); - SummoningRegistry.registerSummon(new SummoningHelper(this.entitySmallEarthGolemID), new ItemStack[] {new ItemStack(Item.clay), terraeStack, terraeStack}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityIceDemonID), new ItemStack[] {crystallosStack, crystallosStack, aquasalusStack, crystallosStack, sanctusStack, terraeStack}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityBoulderFistID), new ItemStack[] {terraeStack, sanctusStack, tennebraeStack, new ItemStack(Item.bone), new ItemStack(Item.beefCooked), new ItemStack(Item.beefCooked)}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityShadeID), new ItemStack[] {tennebraeStack, tennebraeStack, tennebraeStack, aetherStack, glassStack, new ItemStack(Item.glassBottle)}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityAirElementalID), new ItemStack[] {aetherStack, aetherStack, aetherStack, aetherStack, aetherStack, aetherStack}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityWaterElementalID), new ItemStack[] {aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityEarthElementalID), new ItemStack[] {terraeStack, terraeStack, terraeStack, terraeStack, terraeStack, terraeStack}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityFireElementalID), new ItemStack[] {incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityFallenAngelID), new ItemStack[]{sanctusStack, sanctusStack, sanctusStack, aetherStack, tennebraeStack, terraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityLowerGuardianID), new ItemStack[]{cobblestoneStack, cobblestoneStack, terraeStack, tennebraeStack, new ItemStack(Item.ingotIron), new ItemStack(Item.goldNugget)}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityBileDemonID), new ItemStack[]{new ItemStack(Item.poisonousPotato), tennebraeStack, terraeStack, new ItemStack(Item.porkRaw), new ItemStack(Item.egg), new ItemStack(Item.beefRaw)}, new ItemStack[]{crepitousStack, crepitousStack, terraeStack, ironBlockStack, ironBlockStack, diamondStack}, new ItemStack[]{}, 0, 5); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityWingedFireDemonID), new ItemStack[]{aetherStack, incendiumStack, incendiumStack, incendiumStack, tennebraeStack, new ItemStack(Block.netherrack)}, new ItemStack[]{diamondStack, new ItemStack(Block.blockGold), magicalesStack, magicalesStack, new ItemStack(Item.fireballCharge), new ItemStack(Block.coalBlock)}, new ItemStack[]{}, 0, 5); + SummoningRegistry.registerSummon(new SummoningHelper(this.entitySmallEarthGolemID), new ItemStack[]{new ItemStack(Item.clay), terraeStack, terraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityIceDemonID), new ItemStack[]{crystallosStack, crystallosStack, aquasalusStack, crystallosStack, sanctusStack, terraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityBoulderFistID), new ItemStack[]{terraeStack, sanctusStack, tennebraeStack, new ItemStack(Item.bone), new ItemStack(Item.beefCooked), new ItemStack(Item.beefCooked)}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityShadeID), new ItemStack[]{tennebraeStack, tennebraeStack, tennebraeStack, aetherStack, glassStack, new ItemStack(Item.glassBottle)}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityAirElementalID), new ItemStack[]{aetherStack, aetherStack, aetherStack, aetherStack, aetherStack, aetherStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityWaterElementalID), new ItemStack[]{aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityEarthElementalID), new ItemStack[]{terraeStack, terraeStack, terraeStack, terraeStack, terraeStack, terraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityFireElementalID), new ItemStack[]{incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); //TODO SummoningRegistry.registerSummon(new SummoningHelper(this.entityShadeElementalID), new ItemStack[]{tennebraeStack,tennebraeStack,tennebraeStack,tennebraeStack,tennebraeStack,tennebraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); - SummoningRegistry.registerSummon(new SummoningHelper(this.entityHolyElementalID), new ItemStack[] {sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, new ItemStack[] {}, new ItemStack[] {}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelper(this.entityHolyElementalID), new ItemStack[]{sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); //Custom mobs EntityRegistry.registerModEntity(EntityFallenAngel.class, "FallenAngel", this.entityFallenAngelID, this, 80, 3, true); EntityRegistry.registerModEntity(EntityLowerGuardian.class, "LowerGuardian", this.entityLowerGuardianID, this, 80, 3, true); @@ -1219,13 +773,13 @@ public class AlchemicalWizardry LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.ShadeElemental.name", "en_US", "Shade Elemental"); LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.HolyElemental.name", "en_US", "Holy Elemental"); LanguageRegistry.instance().addStringLocalization("itemGroup.tabBloodMagic", "en_US", "Blood Magic"); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(this.standardBindingAgent), 1, 3, this.standardBindingAgentDungeonChance)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(this.mundanePowerCatalyst), 1, 1, this.mundanePowerCatalystDungeonChance)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(this.mundaneLengtheningCatalyst), 1, 1, this.mundaneLengtheningCatalystDungeonChance)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(this.averagePowerCatalyst), 1, 1, this.averagePowerCatalystDungeonChance)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(this.averageLengtheningCatalyst), 1, 1, this.averageLengtheningCatalystDungeonChance)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(this.greaterPowerCatalyst), 1, 1, this.greaterPowerCatalystDungeonChance)); - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(this.greaterLengtheningCatalyst), 1, 1, this.greaterLengtheningCatalystDungeonChance)); + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.standardBindingAgent), 1, 3, this.standardBindingAgentDungeonChance)); + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundanePowerCatalyst), 1, 1, this.mundanePowerCatalystDungeonChance)); + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundaneLengtheningCatalyst), 1, 1, this.mundaneLengtheningCatalystDungeonChance)); + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.averagePowerCatalyst), 1, 1, this.averagePowerCatalystDungeonChance)); + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.averageLengtheningCatalyst), 1, 1, this.averageLengtheningCatalystDungeonChance)); + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.greaterPowerCatalyst), 1, 1, this.greaterPowerCatalystDungeonChance)); + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.greaterLengtheningCatalyst), 1, 1, this.greaterLengtheningCatalystDungeonChance)); //Ore Dictionary Registration OreDictionary.registerOre("oreCoal", Block.oreCoal); MeteorRegistry.registerMeteorParadigm(diamondStack, diamondMeteorArray, diamondMeteorRadius); @@ -1248,8 +802,8 @@ public class AlchemicalWizardry try { //do stuff - sanguineHelmet = new ItemSanguineArmour(sanguineHelmetItemID).setUnlocalizedName("sanguineHelmet"); - LanguageRegistry.addName(sanguineHelmet, "Sanguine Helmet"); + ModItems.sanguineHelmet = new ItemSanguineArmour(sanguineHelmetItemID).setUnlocalizedName("sanguineHelmet"); + LanguageRegistry.addName(ModItems.sanguineHelmet, "Sanguine Helmet"); // focusBloodBlast = new FocusBloodBlast(focusBloodBlastItemID); // LanguageRegistry.addName(focusBloodBlast,"Wand Focus: Blood Blast"); // @@ -1263,14 +817,12 @@ public class AlchemicalWizardry } //LogHelper.log(Level.INFO, "Loaded RP2 World addon"); - } - catch (Exception e) + } catch (Exception e) { //LogHelper.log(Level.SEVERE, "Could not load RP2 World addon"); e.printStackTrace(System.err); } - } - else + } else { this.isThaumcraftLoaded = false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 918440ee..e0d32710 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -1,12 +1,8 @@ package WayofTime.alchemicalWizardry.common; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; +import cpw.mods.fml.common.ObfuscationReflectionHelper; +import cpw.mods.fml.relauncher.ReflectionHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; @@ -19,13 +15,13 @@ import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.living.LivingAttackEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; -import cpw.mods.fml.common.ObfuscationReflectionHelper; -import cpw.mods.fml.relauncher.ReflectionHelper; + +import java.util.*; public class AlchemicalWizardryEventHooks { - public static Map playerFlightBuff = new HashMap(); - public static Map playerBoostStepHeight = new HashMap(); + public static Map playerFlightBuff = new HashMap(); + public static Map playerBoostStepHeight = new HashMap(); public static List playersWith1Step = new ArrayList(); @ForgeSubscribe @@ -51,7 +47,7 @@ public class AlchemicalWizardryEventHooks { int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionReciprocation).getAmplifier(); float damageRecieve = event.ammount / 2 * (i + 1); - ((EntityLivingBase)entityAttacking).attackEntityFrom(DamageSource.generic, damageRecieve); + ((EntityLivingBase) entityAttacking).attackEntityFrom(DamageSource.generic, damageRecieve); } } } @@ -65,11 +61,11 @@ public class AlchemicalWizardryEventHooks @ForgeSubscribe public void onEntityUpdate(LivingUpdateEvent event) { - EntityLivingBase entityLiving = event.entityLiving; + EntityLivingBase entityLiving = event.entityLiving; if (entityLiving instanceof EntityPlayer && entityLiving.worldObj.isRemote) { - EntityPlayer entityPlayer = (EntityPlayer)entityLiving; + EntityPlayer entityPlayer = (EntityPlayer) entityLiving; boolean highStepListed = playersWith1Step.contains(entityPlayer.username); boolean hasHighStep = entityPlayer.isPotionActive(AlchemicalWizardry.customPotionBoost); @@ -89,7 +85,7 @@ public class AlchemicalWizardryEventHooks { int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionDrowning).getAmplifier(); - if (event.entityLiving.worldObj.getWorldTime() % ((int)(20 / (i + 1))) == 0) + if (event.entityLiving.worldObj.getWorldTime() % ((int) (20 / (i + 1))) == 0) { event.entityLiving.attackEntityFrom(DamageSource.drown, 2); event.entityLiving.hurtResistantTime = Math.min(event.entityLiving.hurtResistantTime, 20 / (i + 1)); @@ -106,13 +102,13 @@ public class AlchemicalWizardryEventHooks if (event.entityLiving instanceof EntityPlayer) { - EntityPlayer entityPlayer = (EntityPlayer)event.entityLiving; + EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving; entityPlayer.stepHeight = 1.0f; if (!entityPlayer.worldObj.isRemote) { - float speed = ((Float)ReflectionHelper.getPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, new String[] { "walkSpeed", "g", "field_75097_g" })).floatValue(); - ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, Float.valueOf(speed + (float)percentIncrease), new String[] { "walkSpeed", "g", "field_75097_g" }); //CAUTION + float speed = ((Float) ReflectionHelper.getPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, new String[]{"walkSpeed", "g", "field_75097_g"})).floatValue(); + ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, Float.valueOf(speed + (float) percentIncrease), new String[]{"walkSpeed", "g", "field_75097_g"}); //CAUTION } } } @@ -122,9 +118,9 @@ public class AlchemicalWizardryEventHooks { int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionProjProt).getAmplifier(); EntityLivingBase entity = event.entityLiving; - int posX = (int)Math.round(entity.posX - 0.5f); - int posY = (int)Math.round(entity.posY); - int posZ = (int)Math.round(entity.posZ - 0.5f); + int posX = (int) Math.round(entity.posX - 0.5f); + int posY = (int) Math.round(entity.posY); + int posZ = (int) Math.round(entity.posZ - 0.5f); int d0 = i; AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0); List list = event.entityLiving.worldObj.getEntitiesWithinAABB(Entity.class, axisalignedbb); @@ -133,7 +129,7 @@ public class AlchemicalWizardryEventHooks while (iterator.hasNext()) { - Entity projectile = (Entity)iterator.next(); + Entity projectile = (Entity) iterator.next(); if (projectile == null) { @@ -147,17 +143,15 @@ public class AlchemicalWizardryEventHooks if (projectile instanceof EntityArrow) { - if (((EntityArrow)projectile).shootingEntity == null) + if (((EntityArrow) projectile).shootingEntity == null) { - } - else if (!(((EntityArrow)projectile).shootingEntity == null) && ((EntityArrow)projectile).shootingEntity.equals(entity)) + } else if (!(((EntityArrow) projectile).shootingEntity == null) && ((EntityArrow) projectile).shootingEntity.equals(entity)) { break; } - } - else if (projectile instanceof EnergyBlastProjectile) + } else if (projectile instanceof EnergyBlastProjectile) { - if (!(((EnergyBlastProjectile)projectile).shootingEntity == null) && ((EnergyBlastProjectile)projectile).shootingEntity.equals(entity)) + if (!(((EnergyBlastProjectile) projectile).shootingEntity == null) && ((EnergyBlastProjectile) projectile).shootingEntity.equals(entity)) { break; } @@ -184,18 +178,17 @@ public class AlchemicalWizardryEventHooks { if (event.entityLiving instanceof EntityPlayer) { - EntityPlayer entityPlayer = (EntityPlayer)event.entityLiving; + EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving; String ownerName = entityPlayer.username; playerFlightBuff.put(ownerName, true); entityPlayer.capabilities.allowFlying = true; //entityPlayer.sendPlayerAbilities(); } - } - else + } else { if (event.entityLiving instanceof EntityPlayer) { - EntityPlayer entityPlayer = (EntityPlayer)event.entityLiving; + EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving; String ownerName = entityPlayer.username; if (!playerFlightBuff.containsKey(ownerName)) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java index 2f1bbc00..53ce8aea 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java @@ -1,13 +1,13 @@ package WayofTime.alchemicalWizardry.common; +import WayofTime.alchemicalWizardry.common.items.LavaCrystal; +import cpw.mods.fml.common.IFuelHandler; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; -import WayofTime.alchemicalWizardry.common.items.LavaCrystal; -import cpw.mods.fml.common.IFuelHandler; public class AlchemicalWizardryFuelHandler implements IFuelHandler { @@ -17,19 +17,18 @@ public class AlchemicalWizardryFuelHandler implements IFuelHandler ItemStack itemStack = fuel; int var1 = fuel.itemID; - if (var1 == AlchemicalWizardry.lavaCrystal.itemID) + if (var1 == ModItems.lavaCrystal.itemID) { /*ItemStack newItem = new ItemStack(AlchemicalWizardry.lavaCrystal); newItem.getItem().setDamage(newItem, 50); fuel.getItem().setContainerItem(((LavaCrystal)newItem.getItem()).change()); */ - LavaCrystal item = (LavaCrystal)fuel.getItem(); + LavaCrystal item = (LavaCrystal) fuel.getItem(); if (item.hasEnoughEssence(fuel)) { return 200; - } - else + } else { NBTTagCompound tag = itemStack.stackTagCompound; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryTickHandler.java b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryTickHandler.java index 838e8a0f..93ee33fd 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryTickHandler.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryTickHandler.java @@ -1,15 +1,13 @@ package WayofTime.alchemicalWizardry.common; -import java.util.EnumSet; - -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.PlayerCapabilities; -import net.minecraft.item.ItemStack; -import net.minecraft.server.MinecraftServer; import cpw.mods.fml.common.ITickHandler; import cpw.mods.fml.common.ObfuscationReflectionHelper; import cpw.mods.fml.common.TickType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.PlayerCapabilities; +import net.minecraft.server.MinecraftServer; + +import java.util.EnumSet; public class AlchemicalWizardryTickHandler implements ITickHandler { @@ -42,7 +40,7 @@ public class AlchemicalWizardryTickHandler implements ITickHandler if (entityPlayer != null) { - ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, Float.valueOf(0.1f), new String[] { "walkSpeed", "g", "field_75097_g" }); + ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"}); //entityPlayer.sendPlayerAbilities(); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/BloodMagicConfiguration.java b/BM_src/WayofTime/alchemicalWizardry/common/BloodMagicConfiguration.java new file mode 100644 index 00000000..c8ccafe1 --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/BloodMagicConfiguration.java @@ -0,0 +1,201 @@ +package WayofTime.alchemicalWizardry.common; + +import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; +import cpw.mods.fml.common.FMLLog; +import net.minecraftforge.common.Configuration; +import totemic_commons.pokefenn.lib.Reference; + +import java.io.File; +import java.util.logging.Level; + +/** + * Created with IntelliJ IDEA. + * User: Pokefenn + * Date: 17/01/14 + * Time: 19:50 + */ +public class BloodMagicConfiguration +{ + + + public static Configuration config; + public static final String CATEGORY_GAMEPLAY = "gameplay"; + + + public static void init(File configFile) + { + + config = new Configuration(configFile); + + try + { + + config.load(); + + AlchemicalWizardry.standardBindingAgentDungeonChance = config.get("Dungeon Loot Chances", "standardBindingAgent", 30).getInt(); + AlchemicalWizardry.mundanePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundanePowerCatalyst", 20).getInt(); + AlchemicalWizardry.averagePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "averagePowerCatalyst", 10).getInt(); + AlchemicalWizardry.greaterPowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterPowerCatalyst", 05).getInt(); + AlchemicalWizardry.mundaneLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundaneLengtheningCatalyst", 20).getInt(); + AlchemicalWizardry.averageLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "averageLengtheningCatalyst", 10).getInt(); + AlchemicalWizardry.greaterLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterLengtheningCatalyst", 05).getInt(); + AlchemicalWizardry.customPotionDrowningID = config.get("Potion ID", "Drowning", 100).getInt(); + AlchemicalWizardry.customPotionBoostID = config.get("Potion ID", "Boost", 101).getInt(); + AlchemicalWizardry.customPotionProjProtID = config.get("Potion ID", "ProjProt", 102).getInt(); + AlchemicalWizardry.customPotionInhibitID = config.get("Potion ID", "Inhibit", 103).getInt(); + AlchemicalWizardry.customPotionFlightID = config.get("Potion ID", "Flight", 104).getInt(); + AlchemicalWizardry.customPotionReciprocationID = config.get("Potion ID", "Reciprocation", 105).getInt(); + + MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt(); + AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true); + AlchemicalWizardry.diamondMeteorArray = config.get("meteor", "diamondMeteor", new String[]{"oreDiamond", "100", "oreEmerald", "75", "oreCinnabar", "200", "oreAmber", "200"}).getStringList(); + AlchemicalWizardry.diamondMeteorRadius = config.get("meteor", "diamondMeteorRadius", 5).getInt(); + AlchemicalWizardry.stoneMeteorArray = config.get("meteor", "stoneBlockMeteor", new String[]{"oreCoal", "150", "oreApatite", "50", "oreIron", "50"}).getStringList(); + AlchemicalWizardry.stoneMeteorRadius = config.get("meteor", "stoneMeteorRadius", 16).getInt(); + AlchemicalWizardry.ironBlockMeteorArray = config.get("meteor", "ironBlockMeteor", new String[]{"oreIron", "400", "oreGold", "30", "oreCopper", "200", "oreTin", "140", "oreSilver", "70", "oreLead", "80", "oreLapis", "60", "oreRedstone", "100"}).getStringList(); + AlchemicalWizardry.ironBlockMeteorRadius = config.get("meteor", "ironBlockMeteorRadius", 7).getInt(); + AlchemicalWizardry.netherStarMeteorArray = config.get("meteor", "netherStarMeteor", new String[]{"oreDiamond", "150", "oreEmerald", "100", "oreQuartz", "250", "oreSunstone", "5", "oreMoonstone", "50", "oreIridium", "5", "oreCertusQuartz", "150"}).getStringList(); + AlchemicalWizardry.netherStarMeteorRadius = config.get("meteor", "netherStarMeteorRadius", 3).getInt(); + + AlchemicalWizardry.testingBlockBlockID = config.getBlock("TestingBlock", 1400).getInt(); + AlchemicalWizardry.lifeEssenceFlowingBlockID = config.getBlock("LifeEssenceFlowing", 1401).getInt(); + AlchemicalWizardry.lifeEssenceStillBlockID = config.getBlock("LifeEssenceStill", 1402).getInt(); + AlchemicalWizardry.blockAltarBlockID = config.getBlock("BloodAltar", 1403).getInt(); + AlchemicalWizardry.bloodRuneBlockID = config.getBlock("BloodRune", 1404).getInt(); + AlchemicalWizardry.speedRuneBlockID = config.getBlock("SpeedRune", 1405).getInt(); + AlchemicalWizardry.efficiencyRuneBlockID = config.getBlock("EfficiencyRune", 1406).getInt(); + AlchemicalWizardry.lifeEssenceFluidID = config.getBlock("LifeEssenceFluid", 1407).getInt(); + AlchemicalWizardry.runeOfSacrificeBlockID = config.getBlock("RuneOfSacrifice", 1408).getInt(); + AlchemicalWizardry.runeOfSelfSacrificeBlockID = config.getBlock("RuneOfSelfSacrifice", 1409).getInt(); + AlchemicalWizardry.ritualStoneBlockID = config.getBlock("RitualStone", 1410).getInt(); + AlchemicalWizardry.blockMasterStoneBlockID = config.getBlock("MasterStone", 1411).getInt(); + AlchemicalWizardry.imperfectRitualStoneBlockID = config.getBlock("ImperfectRitualStone", 1412).getInt(); + AlchemicalWizardry.emptySocketBlockID = config.getBlock("EmptySocket", 1413).getInt(); + AlchemicalWizardry.bloodSocketBlockID = config.getBlock("BloodSocket", 1414).getInt(); + AlchemicalWizardry.armourForgeBlockID = config.getBlock("ArmourForge", 1415).getInt(); + AlchemicalWizardry.largeBloodStoneBrickBlockID = config.getBlock("LargeBloodStoneBrick", 1416).getInt(); + AlchemicalWizardry.bloodStoneBrickBlockID = config.getBlock("BloodStoneBrick", 1417).getInt(); + AlchemicalWizardry.blockWritingTableBlockID = config.getBlock("BlockWritingTable", 1418).getInt(); + AlchemicalWizardry.blockHomHeartBlockID = config.getBlock("BlockHomHeart", 1419).getInt(); + AlchemicalWizardry.blockPedestalBlockID = config.getBlock("BlockPedestal", 1420).getInt(); + AlchemicalWizardry.blockPlinthBlockID = config.getBlock("BlockPlinth", 1421).getInt(); + AlchemicalWizardry.blockTeleposerBlockID = config.getBlock("BlockTeleposer", 1422).getInt(); + AlchemicalWizardry.spectralBlockBlockID = config.getBlock("SpectralBlock", 1423).getInt(); + AlchemicalWizardry.blockBloodLightBlockID = config.getBlock("BloodLight", 1424).getInt(); + //blockConduitBlockID = config.getBlock("BlockConduit", 1424).getInt(); + //Items + AlchemicalWizardry.weakBloodOrbItemID = config.getItem("WeakBloodOrb", 17000).getInt(); + AlchemicalWizardry.energyBlasterItemID = config.getItem("EnergyBlaster", 17001).getInt(); + AlchemicalWizardry.energySwordItemID = config.getItem("EnergySword", 17002).getInt(); + AlchemicalWizardry.lavaCrystalItemID = config.getItem("LavaCrystal", 17003).getInt(); + AlchemicalWizardry.waterSigilItemID = config.getItem("WaterSigil", 17004).getInt(); + AlchemicalWizardry.lavaSigilItemID = config.getItem("LavaSigil", 17005).getInt(); + AlchemicalWizardry.voidSigilItemID = config.getItem("VoidSigil", 17006).getInt(); + AlchemicalWizardry.blankSlateItemID = config.getItem("BlankSlate", 17007).getInt(); + AlchemicalWizardry.reinforcedSlateItemID = config.getItem("ReinforcedSlate", 17008).getInt(); + AlchemicalWizardry.sacrificialDaggerItemID = config.getItem("SacrificialDagger", 17009).getInt(); + AlchemicalWizardry.bucketLifeItemID = config.getItem("BucketLife", 17010).getInt(); + AlchemicalWizardry.apprenticeBloodOrbItemID = config.getItem("ApprenticeBloodOrb", 17011).getInt(); + AlchemicalWizardry.daggerOfSacrificeItemID = config.getItem("DaggerOfSacrifice", 17012).getInt(); + AlchemicalWizardry.airSigilItemID = config.getItem("AirSigil", 17013).getInt(); + AlchemicalWizardry.sigilOfTheFastMinerItemID = config.getItem("SigilOfTheFastMiner", 17014).getInt(); +// elementalInkWaterItemID = config.getItem("ElementalInkWater", 17015).getInt(); +// elementalInkFireItemID = config.getItem("ElementalInkFire", 17016).getInt(); +// elementalInkEarthItemID = config.getItem("ElementalInkEarth", 17017).getInt(); +// elementalInkAirItemID = config.getItem("ElementalInkAir", 17018).getInt(); + AlchemicalWizardry.duskScribeToolItemID = config.getItem("DuskScribeTool", 17015).getInt(); + AlchemicalWizardry.demonPlacerItemID = config.getItem("DemonPlacer", 17016).getInt(); + AlchemicalWizardry.itemBloodRuneBlockItemID = config.getItem("ItemBloodRuneBlock", 17017).getInt(); + AlchemicalWizardry.armourInhibitorItemID = config.getItem("ArmourInhibitor", 17018).getInt(); + AlchemicalWizardry.divinationSigilItemID = config.getItem("DivinationSigin", 17019).getInt(); + AlchemicalWizardry.waterScribeToolItemID = config.getItem("WaterScribeTool", 17020).getInt(); + AlchemicalWizardry.fireScribeToolItemID = config.getItem("FireScribeTool", 17021).getInt(); + AlchemicalWizardry.earthScribeToolItemID = config.getItem("EarthScribeTool", 17022).getInt(); + AlchemicalWizardry.airScribeToolItemID = config.getItem("AirScribeTool", 17023).getInt(); + AlchemicalWizardry.weakActivationCrystalItemID = config.getItem("WeakActivationCrystal", 17024).getInt(); + AlchemicalWizardry.magicianBloodOrbItemID = config.getItem("MagicianBloodOrb", 17025).getInt(); + AlchemicalWizardry.sigilOfElementalAffinityItemID = config.getItem("SigilOfElementalAffinity", 17026).getInt(); + AlchemicalWizardry.sigilOfHasteItemID = config.getItem("SigilOfHaste", 17027).getInt(); + AlchemicalWizardry.sigilOfHoldingItemID = config.getItem("SigilOfHolding", 17028).getInt(); + AlchemicalWizardry.boundPickaxeItemID = config.getItem("BoundPickaxe", 17029).getInt(); + AlchemicalWizardry.boundAxeItemID = config.getItem("BoundAxe", 17030).getInt(); + AlchemicalWizardry.boundShovelItemID = config.getItem("BoundShovel", 17031).getInt(); + AlchemicalWizardry.boundHelmetItemID = config.getItem("BoundHelmet", 17032).getInt(); + AlchemicalWizardry.boundPlateItemID = config.getItem("BoundPlate", 17033).getInt(); + AlchemicalWizardry.boundLeggingsItemID = config.getItem("BoundLeggings", 17034).getInt(); + AlchemicalWizardry.boundBootsItemID = config.getItem("BoundBoots", 17035).getInt(); + AlchemicalWizardry.weakBloodShardItemID = config.getItem("WeakBloodShard", 17036).getInt(); + AlchemicalWizardry.growthSigilItemID = config.getItem("SigilOfGrowth", 17037).getInt(); + AlchemicalWizardry.masterBloodOrbItemID = config.getItem("MasterBloodOrb", 17038).getInt(); + AlchemicalWizardry.blankSpellItemID = config.getItem("BlankSpell", 17039).getInt(); + AlchemicalWizardry.alchemyFlaskItemID = config.getItem("AlchemyFlask", 17040).getInt(); + AlchemicalWizardry.standardBindingAgentItemID = config.getItem("StandardBindingAgent", 17041).getInt(); + AlchemicalWizardry.mundanePowerCatalystItemID = config.getItem("MundanePowerCatalyst", 17042).getInt(); + AlchemicalWizardry.averagePowerCatalystItemID = config.getItem("AveragePowerCatalyst", 17043).getInt(); + AlchemicalWizardry.greaterPowerCatalystItemID = config.getItem("GreaterPowerCatalyst", 17044).getInt(); + AlchemicalWizardry.mundaneLengtheningCatalystItemID = config.getItem("MundaneLengtheningCatalyst", 17045).getInt(); + AlchemicalWizardry.averageLengtheningCatalystItemID = config.getItem("AverageLengtheningCatalyst", 17046).getInt(); + AlchemicalWizardry.greaterLengtheningCatalystItemID = config.getItem("GreaterLengtheningCatalyst", 17047).getInt(); + AlchemicalWizardry.demonBloodShardItemID = config.getItem("DemonBloodShard", 17048).getInt(); + AlchemicalWizardry.archmageBloodOrbItemID = config.getItem("ArchmageBloodOrb", 17049).getInt(); + AlchemicalWizardry.sigilOfWindItemID = config.getItem("SigilOfWind", 17050).getInt(); + AlchemicalWizardry.telepositionFocusItemID = config.getItem("TelepositionFocusItemID", 17051).getInt(); + AlchemicalWizardry.enhancedTelepositionFocusItemID = config.getItem("EnhancedTelepositionFocus", 17052).getInt(); + AlchemicalWizardry.reinforcedTelepositionFocusItemID = config.getItem("ReinforcedTelepositionFocus", 17053).getInt(); + AlchemicalWizardry.demonicTelepositionFocusItemID = config.getItem("DemonicTelepositionFocus", 17054).getInt(); + AlchemicalWizardry.imbuedSlateItemID = config.getItem("ImbuedSlate", 17055).getInt(); + AlchemicalWizardry.demonicSlateItemID = config.getItem("DemonicSlate", 17056).getInt(); + AlchemicalWizardry.sigilOfTheBridgeItemID = config.getItem("SigilOfTheBridge", 17057).getInt(); + AlchemicalWizardry.creativeFillerItemID = config.getItem("CreativeFiller", 17058).getInt(); + AlchemicalWizardry.itemRitualDivinerItemID = config.getItem("ItemRitualDiviner", 17059).getInt(); + AlchemicalWizardry.itemKeyOfDiabloItemID = config.getItem("ItemKeyOfDiablo", 17081).getInt(); + AlchemicalWizardry.energyBazookaItemID = config.getItem("EnergyBazooka", 17082).getInt(); + AlchemicalWizardry.itemBloodLightSigilItemID = config.getItem("BloodLightSigil", 17083).getInt(); + AlchemicalWizardry.simpleCatalystItemID = config.getItem("SimpleCatalyst", 17060).getInt(); + AlchemicalWizardry.incendiumItemID = config.getItem("Incendium", 17061).getInt(); + AlchemicalWizardry.magicalesItemID = config.getItem("Magicales", 17062).getInt(); + AlchemicalWizardry.sanctusItemID = config.getItem("Sanctus", 17063).getInt(); + AlchemicalWizardry.aetherItemID = config.getItem("Aether", 17064).getInt(); + AlchemicalWizardry.crepitousItemID = config.getItem("Crepitous", 17065).getInt(); + AlchemicalWizardry.crystallosItemID = config.getItem("Crystallos", 17066).getInt(); + AlchemicalWizardry.terraeItemID = config.getItem("Terrae", 17067).getInt(); + AlchemicalWizardry.aquasalusItemID = config.getItem("Aquasalus", 17068).getInt(); + AlchemicalWizardry.tennebraeItemID = config.getItem("Tennebrae", 17069).getInt(); + AlchemicalWizardry.weakBindingAgentItemID = config.getItem("WeakBindingAgent", 17070).getInt(); + AlchemicalWizardry.weakFillingAgentItemID = config.getItem("WeakFillingAgent", 17072).getInt(); + AlchemicalWizardry.standardFillingAgentItemID = config.getItem("StandardFillingAgent", 17073).getInt(); + AlchemicalWizardry.enhancedFillingAgentItemID = config.getItem("EnhancedFillingAgent", 17074).getInt(); + AlchemicalWizardry.sanguineHelmetItemID = config.getItem("SanguineHelmet", 17075).getInt(); + AlchemicalWizardry.focusBloodBlastItemID = config.getItem("FocusBloodBlast", 17076).getInt(); + AlchemicalWizardry.focusGravityWellItemID = config.getItem("FocusGravityWell", 17077).getInt(); + AlchemicalWizardry.sigilOfMagnetismItemID = config.getItem("SigilOfMagnetism", 17080).getInt(); + + + } catch (Exception e) + { + + FMLLog.log(Level.SEVERE, e, Reference.MOD_NAME + " has had a problem loading its configuration, go ask on the forums :p"); + + } finally + { + config.save(); + } + } + + public static void set(String categoryName, String propertyName, String newValue) + { + + config.load(); + if (config.getCategoryNames().contains(categoryName)) + { + if (config.getCategory(categoryName).containsKey(propertyName)) + { + config.getCategory(categoryName).get(propertyName).set(newValue); + } + } + config.save(); + + + } + +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/CommonProxy.java b/BM_src/WayofTime/alchemicalWizardry/common/CommonProxy.java index 8e9d7a37..d5e61338 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/CommonProxy.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/CommonProxy.java @@ -1,24 +1,11 @@ package WayofTime.alchemicalWizardry.common; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaSecondaryProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor; -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; +import WayofTime.alchemicalWizardry.common.entity.projectile.*; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.world.World; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.world.World; public class CommonProxy { @@ -30,9 +17,11 @@ public class CommonProxy { // Nothing here as the server doesn't render graphics! } + public void registerEntities() { } + public World getClientWorld() { return null; @@ -78,6 +67,7 @@ public class CommonProxy public void registerTickHandlers() { } + public void InitRendering() { // TODO Auto-generated method stub diff --git a/BM_src/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java b/BM_src/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java index a389ef83..2b6fb25a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common; import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.passive.EntityTameable; public class EntityAITargetAggro extends EntityAINearestAttackableTarget { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/EntityAirElemental.java b/BM_src/WayofTime/alchemicalWizardry/common/EntityAirElemental.java index ad314177..4f7ddf11 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/EntityAirElemental.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/EntityAirElemental.java @@ -3,27 +3,11 @@ package WayofTime.alchemicalWizardry.common; import WayofTime.alchemicalWizardry.common.entity.mob.EntityElemental; import cpw.mods.fml.common.network.PacketDispatcher; import cpw.mods.fml.common.network.Player; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityFlying; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.monster.IMob; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityLargeFireball; -import net.minecraft.entity.projectile.EntitySmallFireball; -import net.minecraft.item.Item; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; -import net.minecraft.stats.AchievementList; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.util.Vec3; import net.minecraft.world.World; public class EntityAirElemental extends EntityElemental implements IMob @@ -37,13 +21,12 @@ public class EntityAirElemental extends EntityElemental implements IMob { if (target instanceof EntityPlayer) { - PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(target.motionX, target.motionY + 3, target.motionZ), (Player)target); - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - } - else if (target instanceof EntityLivingBase) + PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(target.motionX, target.motionY + 3, target.motionZ), (Player) target); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); + } else if (target instanceof EntityLivingBase) { - ((EntityLivingBase)target).motionY += 3.0D; - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); + ((EntityLivingBase) target).motionY += 3.0D; + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/ICatalyst.java b/BM_src/WayofTime/alchemicalWizardry/common/ICatalyst.java index e56a27c6..230cd51c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/ICatalyst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/ICatalyst.java @@ -3,5 +3,6 @@ package WayofTime.alchemicalWizardry.common; public interface ICatalyst { public abstract int getCatalystLevel(); + public abstract boolean isConcentration(); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java b/BM_src/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java index 0b362c9f..898f3237 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java @@ -27,12 +27,11 @@ public class LifeBucketHandler { int blockID = world.getBlockId(pos.blockX, pos.blockY, pos.blockZ); - if ((blockID == AlchemicalWizardry.blockLifeEssence.blockID) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) + if ((blockID == ModBlocks.blockLifeEssence.blockID) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { world.setBlock(pos.blockX, pos.blockY, pos.blockZ, 0); return new ItemStack(AlchemicalWizardry.bucketLife); - } - else + } else { return null; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/LifeEssenceNetwork.java b/BM_src/WayofTime/alchemicalWizardry/common/LifeEssenceNetwork.java index 9ecc59aa..3eadeea0 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/LifeEssenceNetwork.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/LifeEssenceNetwork.java @@ -5,6 +5,7 @@ import net.minecraft.nbt.NBTTagCompound; public class LifeEssenceNetwork extends net.minecraft.world.WorldSavedData { public int currentEssence; + public LifeEssenceNetwork(String par1Str) { super(par1Str); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/ModBlocks.java b/BM_src/WayofTime/alchemicalWizardry/common/ModBlocks.java new file mode 100644 index 00000000..2b4a6e28 --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/ModBlocks.java @@ -0,0 +1,75 @@ +package WayofTime.alchemicalWizardry.common; + +import WayofTime.alchemicalWizardry.TestingBlock; +import WayofTime.alchemicalWizardry.common.block.*; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; + +/** + * Created with IntelliJ IDEA. + * User: Pokefenn + * Date: 17/01/14 + * Time: 19:48 + */ +public class ModBlocks +{ + + public static Block testingBlock; + public static Block bloodStoneBrick; + public static Block largeBloodStoneBrick; + // public static Block lifeEssenceStill; +// public static Block lifeEssenceFlowing; + public static BlockAltar blockAltar; + public static BloodRune bloodRune; + public static SpeedRune speedRune; + public static EfficiencyRune efficiencyRune; + public static RuneOfSacrifice runeOfSacrifice; + public static RuneOfSelfSacrifice runeOfSelfSacrifice; + public static Block blockMasterStone; + public static Block ritualStone; + public static Block imperfectRitualStone; + public static Block bloodSocket; + public static Block emptySocket; + public static Block armourForge; + public static Block blockWritingTable; + public static Block blockHomHeart; + public static Block blockPedestal; + public static Block blockPlinth; + public static Block blockLifeEssence; + public static Block blockTeleposer; + public static Block spectralBlock; + public static Block blockConduit; + public static Block blockBloodLight; + + public static void init() + { + + testingBlock = new TestingBlock(AlchemicalWizardry.testingBlockBlockID, Material.ground).setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setCreativeTab(CreativeTabs.tabBlock).setLightValue(1.0F); +//lifeEssenceStill = new LifeEssenceStill(lifeEssenceStillBlockID); +//lifeEssenceFlowing = new LifeEssenceFlowing(lifeEssenceFlowingBlockID); + blockAltar = new BlockAltar(AlchemicalWizardry.blockAltarBlockID); + bloodRune = new BloodRune(AlchemicalWizardry.bloodRuneBlockID); + speedRune = new SpeedRune(AlchemicalWizardry.speedRuneBlockID); + efficiencyRune = new EfficiencyRune(AlchemicalWizardry.efficiencyRuneBlockID); + runeOfSacrifice = new RuneOfSacrifice(AlchemicalWizardry.runeOfSacrificeBlockID); + runeOfSelfSacrifice = new RuneOfSelfSacrifice(AlchemicalWizardry.runeOfSelfSacrificeBlockID); + AlchemicalWizardry.lifeEssenceFluid = new LifeEssence("Life Essence"); + blockTeleposer = new BlockTeleposer(AlchemicalWizardry.blockTeleposerBlockID); + spectralBlock = new SpectralBlock(AlchemicalWizardry.spectralBlockBlockID); + ritualStone = new RitualStone(AlchemicalWizardry.ritualStoneBlockID); + blockMasterStone = new BlockMasterStone(AlchemicalWizardry.blockMasterStoneBlockID); + imperfectRitualStone = new ImperfectRitualStone(AlchemicalWizardry.imperfectRitualStoneBlockID); + bloodSocket = new BlockSocket(AlchemicalWizardry.bloodSocketBlockID); + armourForge = new ArmourForge(AlchemicalWizardry.armourForgeBlockID); + emptySocket = new EmptySocket(AlchemicalWizardry.emptySocketBlockID); + largeBloodStoneBrick = new LargeBloodStoneBrick(AlchemicalWizardry.largeBloodStoneBrickBlockID); + bloodStoneBrick = new BloodStoneBrick(AlchemicalWizardry.bloodStoneBrickBlockID); + blockWritingTable = new BlockWritingTable(AlchemicalWizardry.blockWritingTableBlockID); + blockHomHeart = new BlockHomHeart(AlchemicalWizardry.blockHomHeartBlockID); + blockPedestal = new BlockPedestal(AlchemicalWizardry.blockPedestalBlockID); + blockPlinth = new BlockPlinth(AlchemicalWizardry.blockPlinthBlockID); + blockBloodLight = new BlockBloodLightSource(AlchemicalWizardry.blockBloodLightBlockID); + + } +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/ModItems.java b/BM_src/WayofTime/alchemicalWizardry/common/ModItems.java new file mode 100644 index 00000000..44d55d3f --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/ModItems.java @@ -0,0 +1,188 @@ +package WayofTime.alchemicalWizardry.common; + +import WayofTime.alchemicalWizardry.common.items.*; +import WayofTime.alchemicalWizardry.common.items.potion.*; +import WayofTime.alchemicalWizardry.common.items.sigil.*; +import net.minecraft.item.Item; + +/** + * Created with IntelliJ IDEA. + * User: Pokefenn + * Date: 17/01/14 + * Time: 19:48 + */ +public class ModItems +{ + + + public static Item orbOfTesting; + public static Item weakBloodOrb; + public static Item apprenticeBloodOrb; + public static Item magicianBloodOrb; + public static Item energyBlaster; + public static Item energySword; + public static Item lavaCrystal; + public static Item waterSigil; + public static Item lavaSigil; + public static Item voidSigil; + //public static Item glassShard = new GlassShard(17009).setUnlocalizedName("glassShard"); + //public static Item bloodiedShard = new BloodiedShard(17010).setUnlocalizedName("bloodiedShard"); + public static Item blankSlate; + public static Item reinforcedSlate; + public static Item sacrificialDagger; + public static Item daggerOfSacrifice; + public static Item airSigil; + public static Item sigilOfTheFastMiner; + public static Item sigilOfElementalAffinity; + public static Item sigilOfHaste; + public static Item sigilOfHolding; + public static Item divinationSigil; + // public static Item elementalInkWater; +// public static Item elementalInkFire; +// public static Item elementalInkEarth; +// public static Item elementalInkAir; + public static Item waterScribeTool; + public static Item fireScribeTool; + public static Item earthScribeTool; + public static Item airScribeTool; + public static Item activationCrystal; + public static Item boundPickaxe; + public static Item boundAxe; + public static Item boundShovel; + public static Item boundHelmet; + public static Item boundPlate; + public static Item boundLeggings; + public static Item boundBoots; + public static Item weakBloodShard; + public static Item growthSigil; + //public static Item fireSpell; + public static Item blankSpell; + public static Item masterBloodOrb; + public static Item alchemyFlask; + public static Item standardBindingAgent; + public static Item mundanePowerCatalyst; + public static Item averagePowerCatalyst; + public static Item greaterPowerCatalyst; + public static Item mundaneLengtheningCatalyst; + public static Item averageLengtheningCatalyst; + public static Item greaterLengtheningCatalyst; + public static Item incendium; + public static Item magicales; + public static Item sanctus; + public static Item aether; + public static Item simpleCatalyst; + public static Item crepitous; + public static Item crystallos; + public static Item terrae; + public static Item aquasalus; + public static Item tennebrae; + public static Item demonBloodShard; + public static Item archmageBloodOrb; + public static Item sigilOfWind; + public static Item telepositionFocus; + public static Item enhancedTelepositionFocus; + public static Item reinforcedTelepositionFocus; + public static Item demonicTelepositionFocus; + public static Item imbuedSlate; + public static Item demonicSlate; + public static Item duskScribeTool; + public static Item sigilOfTheBridge; + public static Item armourInhibitor; + public static Item creativeFiller; + public static Item demonPlacer; + public static Item itemBloodRuneBlock; + public static Item weakFillingAgent; + public static Item standardFillingAgent; + public static Item enhancedFillingAgent; + public static Item weakBindingAgent; + public static Item itemRitualDiviner; + public static Item sanguineHelmet; + public static Item focusBloodBlast; + public static Item focusGravityWell; + public static Item sigilOfMagnetism; + public static Item itemKeyOfDiablo; + public static Item energyBazooka; + public static Item itemBloodLightSigil; + + public static void init() + { + weakBloodOrb = new EnergyBattery(AlchemicalWizardry.weakBloodOrbItemID, 5000).setUnlocalizedName("weakBloodOrb"); + apprenticeBloodOrb = new ApprenticeBloodOrb(AlchemicalWizardry.apprenticeBloodOrbItemID, 25000).setUnlocalizedName("apprenticeBloodOrb"); + magicianBloodOrb = new MagicianBloodOrb(AlchemicalWizardry.magicianBloodOrbItemID, 150000).setUnlocalizedName("magicianBloodOrb"); + masterBloodOrb = new MasterBloodOrb(AlchemicalWizardry.masterBloodOrbItemID, 1000000).setUnlocalizedName("masterBloodOrb"); + archmageBloodOrb = new ArchmageBloodOrb(AlchemicalWizardry.archmageBloodOrbItemID, 10000000).setUnlocalizedName("archmageBloodOrb"); + energyBlaster = new EnergyBlast(AlchemicalWizardry.energyBlasterItemID).setUnlocalizedName("energyBlast"); + energySword = new EnergySword(AlchemicalWizardry.energySwordItemID).setUnlocalizedName("energySword"); + lavaCrystal = new LavaCrystal(AlchemicalWizardry.lavaCrystalItemID).setUnlocalizedName("lavaCrystal"); + waterSigil = new WaterSigil(AlchemicalWizardry.waterSigilItemID).setUnlocalizedName("waterSigil"); + lavaSigil = new LavaSigil(AlchemicalWizardry.lavaSigilItemID).setUnlocalizedName("lavaSigil"); + voidSigil = new VoidSigil(AlchemicalWizardry.voidSigilItemID).setUnlocalizedName("voidSigil"); + blankSlate = new AWBaseItems(AlchemicalWizardry.blankSlateItemID).setUnlocalizedName("blankSlate"); + reinforcedSlate = new AWBaseItems(AlchemicalWizardry.reinforcedSlateItemID).setUnlocalizedName("reinforcedSlate"); + sacrificialDagger = new SacrificialDagger(AlchemicalWizardry.sacrificialDaggerItemID).setUnlocalizedName("sacrificialDagger"); + daggerOfSacrifice = new DaggerOfSacrifice(AlchemicalWizardry.daggerOfSacrificeItemID).setUnlocalizedName("daggerOfSacrifice"); + airSigil = new AirSigil(AlchemicalWizardry.airSigilItemID).setUnlocalizedName("airSigil"); + sigilOfTheFastMiner = new SigilOfTheFastMiner(AlchemicalWizardry.sigilOfTheFastMinerItemID).setUnlocalizedName("sigilOfTheFastMiner"); + sigilOfElementalAffinity = new SigilOfElementalAffinity(AlchemicalWizardry.sigilOfElementalAffinityItemID).setUnlocalizedName("sigilOfElementalAffinity"); + sigilOfHaste = new SigilOfHaste(AlchemicalWizardry.sigilOfHasteItemID).setUnlocalizedName("sigilOfHaste"); + sigilOfHolding = new SigilOfHolding(AlchemicalWizardry.sigilOfHoldingItemID).setUnlocalizedName("sigilOfHolding"); + divinationSigil = new DivinationSigil(AlchemicalWizardry.divinationSigilItemID).setUnlocalizedName("divinationSigil"); + waterScribeTool = new WaterScribeTool(AlchemicalWizardry.waterScribeToolItemID).setUnlocalizedName("waterScribeTool"); + fireScribeTool = new FireScribeTool(AlchemicalWizardry.fireScribeToolItemID).setUnlocalizedName("fireScribeTool"); + earthScribeTool = new EarthScribeTool(AlchemicalWizardry.earthScribeToolItemID).setUnlocalizedName("earthScribeTool"); + airScribeTool = new AirScribeTool(AlchemicalWizardry.airScribeToolItemID).setUnlocalizedName("airScribeTool"); + activationCrystal = new ActivationCrystal(AlchemicalWizardry.weakActivationCrystalItemID); + boundPickaxe = new BoundPickaxe(AlchemicalWizardry.boundPickaxeItemID).setUnlocalizedName("boundPickaxe"); + boundAxe = new BoundAxe(AlchemicalWizardry.boundAxeItemID).setUnlocalizedName("boundAxe"); + boundShovel = new BoundShovel(AlchemicalWizardry.boundShovelItemID).setUnlocalizedName("boundShovel"); + boundHelmet = new BoundArmour(AlchemicalWizardry.boundHelmetItemID, 0).setUnlocalizedName("boundHelmet"); + boundPlate = new BoundArmour(AlchemicalWizardry.boundPlateItemID, 1).setUnlocalizedName("boundPlate"); + boundLeggings = new BoundArmour(AlchemicalWizardry.boundLeggingsItemID, 2).setUnlocalizedName("boundLeggings"); + boundBoots = new BoundArmour(AlchemicalWizardry.boundBootsItemID, 3).setUnlocalizedName("boundBoots"); + weakBloodShard = new BloodShard(AlchemicalWizardry.weakBloodShardItemID).setUnlocalizedName("weakBloodShard"); + growthSigil = new SigilOfGrowth(AlchemicalWizardry.growthSigilItemID).setUnlocalizedName("growthSigil"); + blankSpell = new BlankSpell(AlchemicalWizardry.blankSpellItemID).setUnlocalizedName("blankSpell"); + alchemyFlask = new AlchemyFlask(AlchemicalWizardry.alchemyFlaskItemID).setUnlocalizedName("alchemyFlask"); + standardBindingAgent = new StandardBindingAgent(AlchemicalWizardry.standardBindingAgentItemID).setUnlocalizedName("standardBindingAgent"); + mundanePowerCatalyst = new MundanePowerCatalyst(AlchemicalWizardry.mundanePowerCatalystItemID).setUnlocalizedName("mundanePowerCatalyst"); + averagePowerCatalyst = new AveragePowerCatalyst(AlchemicalWizardry.averagePowerCatalystItemID).setUnlocalizedName("averagePowerCatalyst"); + greaterPowerCatalyst = new GreaterPowerCatalyst(AlchemicalWizardry.greaterPowerCatalystItemID).setUnlocalizedName("greaterPowerCatalyst"); + mundaneLengtheningCatalyst = new MundaneLengtheningCatalyst(AlchemicalWizardry.mundaneLengtheningCatalystItemID).setUnlocalizedName("mundaneLengtheningCatalyst"); + averageLengtheningCatalyst = new AverageLengtheningCatalyst(AlchemicalWizardry.averageLengtheningCatalystItemID).setUnlocalizedName("averageLengtheningCatalyst"); + greaterLengtheningCatalyst = new GreaterLengtheningCatalyst(AlchemicalWizardry.greaterLengtheningCatalystItemID).setUnlocalizedName("greaterLengtheningCatalyst"); + incendium = new AlchemyReagent(AlchemicalWizardry.incendiumItemID).setUnlocalizedName("incendium"); + magicales = new AlchemyReagent(AlchemicalWizardry.magicalesItemID).setUnlocalizedName("magicales"); + sanctus = new AlchemyReagent(AlchemicalWizardry.sanctusItemID).setUnlocalizedName("sanctus"); + aether = new AlchemyReagent(AlchemicalWizardry.aetherItemID).setUnlocalizedName("aether"); + simpleCatalyst = new AlchemyReagent(AlchemicalWizardry.simpleCatalystItemID).setUnlocalizedName("simpleCatalyst"); + crepitous = new AlchemyReagent(AlchemicalWizardry.crepitousItemID).setUnlocalizedName("crepitous"); + crystallos = new AlchemyReagent(AlchemicalWizardry.crystallosItemID).setUnlocalizedName("crystallos"); + terrae = new AlchemyReagent(AlchemicalWizardry.terraeItemID).setUnlocalizedName("terrae"); + aquasalus = new AlchemyReagent(AlchemicalWizardry.aquasalusItemID).setUnlocalizedName("aquasalus"); + tennebrae = new AlchemyReagent(AlchemicalWizardry.tennebraeItemID).setUnlocalizedName("tennebrae"); + demonBloodShard = new BloodShard(AlchemicalWizardry.demonBloodShardItemID).setUnlocalizedName("demonBloodShard"); + sigilOfWind = new SigilOfWind(AlchemicalWizardry.sigilOfWindItemID).setUnlocalizedName("sigilOfWind"); + telepositionFocus = new TelepositionFocus(AlchemicalWizardry.telepositionFocusItemID, 1).setUnlocalizedName("telepositionFocus"); + enhancedTelepositionFocus = new EnhancedTelepositionFocus(AlchemicalWizardry.enhancedTelepositionFocusItemID).setUnlocalizedName("enhancedTelepositionFocus"); + reinforcedTelepositionFocus = new ReinforcedTelepositionFocus(AlchemicalWizardry.reinforcedTelepositionFocusItemID).setUnlocalizedName("reinforcedTelepositionFocus"); + demonicTelepositionFocus = new DemonicTelepositionFocus(AlchemicalWizardry.demonicTelepositionFocusItemID).setUnlocalizedName("demonicTelepositionFocus"); + imbuedSlate = new AWBaseItems(AlchemicalWizardry.imbuedSlateItemID).setUnlocalizedName("imbuedSlate"); + demonicSlate = new AWBaseItems(AlchemicalWizardry.demonicSlateItemID).setUnlocalizedName("demonicSlate"); + duskScribeTool = new DuskScribeTool(AlchemicalWizardry.duskScribeToolItemID).setUnlocalizedName("duskScribeTool"); + sigilOfTheBridge = new SigilOfTheBridge(AlchemicalWizardry.sigilOfTheBridgeItemID).setUnlocalizedName("sigilOfTheBridge"); + armourInhibitor = new ArmourInhibitor(AlchemicalWizardry.armourInhibitorItemID).setUnlocalizedName("armourInhibitor"); + creativeFiller = new CheatyItem(AlchemicalWizardry.creativeFillerItemID).setUnlocalizedName("cheatyItem"); + demonPlacer = new DemonPlacer(AlchemicalWizardry.demonPlacerItemID).setUnlocalizedName("demonPlacer"); + weakFillingAgent = new WeakFillingAgent(AlchemicalWizardry.weakFillingAgentItemID).setUnlocalizedName("weakFillingAgent"); + standardFillingAgent = new StandardFillingAgent(AlchemicalWizardry.standardFillingAgentItemID).setUnlocalizedName("standardFillingAgent"); + enhancedFillingAgent = new EnhancedFillingAgent(AlchemicalWizardry.enhancedFillingAgentItemID).setUnlocalizedName("enhancedFillingAgent"); + weakBindingAgent = new WeakBindingAgent(AlchemicalWizardry.weakBindingAgentItemID).setUnlocalizedName("weakBindingAgent"); + itemRitualDiviner = new ItemRitualDiviner(AlchemicalWizardry.itemRitualDivinerItemID).setUnlocalizedName("ritualDiviner"); + sigilOfMagnetism = new SigilOfMagnetism(AlchemicalWizardry.sigilOfMagnetismItemID).setUnlocalizedName("sigilOfMagnetism"); + itemKeyOfDiablo = new ItemDiabloKey(AlchemicalWizardry.itemKeyOfDiabloItemID).setUnlocalizedName("itemDiabloKey"); + energyBazooka = new EnergyBazooka(AlchemicalWizardry.energyBazookaItemID).setUnlocalizedName("energyBazooka"); + itemBloodLightSigil = new ItemBloodLightSigil(AlchemicalWizardry.itemBloodLightSigilItemID).setUnlocalizedName("bloodLightSigil"); + + + } +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java b/BM_src/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java index e451350f..5e610452 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java @@ -26,7 +26,7 @@ public class ModLivingDropsEvent if (effect.getAmplifier() >= 2) if (rand < 0.50d) { - event.entityLiving.dropItem(AlchemicalWizardry.weakBloodShard.itemID, 1); + event.entityLiving.dropItem(ModItems.weakBloodShard.itemID, 1); } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/PacketHandler.java b/BM_src/WayofTime/alchemicalWizardry/common/PacketHandler.java index 6b990d8f..424b7a55 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/PacketHandler.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/PacketHandler.java @@ -1,28 +1,12 @@ package WayofTime.alchemicalWizardry.common; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.Random; - import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; - +import WayofTime.alchemicalWizardry.common.tileEntity.*; import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; - -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; +import cpw.mods.fml.common.network.IPacketHandler; +import cpw.mods.fml.common.network.Player; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.INetworkManager; import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet250CustomPayload; @@ -32,11 +16,10 @@ import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; -import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import cpw.mods.fml.common.network.IPacketHandler; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; + +import java.io.*; +import java.util.Random; public class PacketHandler implements IPacketHandler { @@ -80,15 +63,13 @@ public class PacketHandler implements IPacketHandler FluidStack flInput = new FluidStack(fluidIDInput, fluidAmountInput); tileEntityAltar.handlePacketData(items, flMain, flOutput, flInput, capacity); } - } - else if (packet.channel.equals("FallReset")) + } else if (packet.channel.equals("FallReset")) { if (player instanceof EntityPlayer) { - ((EntityPlayer)player).fallDistance = 0; + ((EntityPlayer) player).fallDistance = 0; } - } - else if (packet.channel.equals("particle")) + } else if (packet.channel.equals("particle")) { ByteArrayInputStream bin = new ByteArrayInputStream(packet.data); DataInputStream din = new DataInputStream(bin); @@ -100,7 +81,7 @@ public class PacketHandler implements IPacketHandler double y = din.readDouble(); double z = din.readDouble(); short particleType = din.readShort(); - World world = ((EntityPlayer)player).worldObj; + World world = ((EntityPlayer) player).worldObj; if (particleType == 1) { @@ -119,7 +100,7 @@ public class PacketHandler implements IPacketHandler if (particleType == 4) { - float f = (float)1.0F; + float f = (float) 1.0F; float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; @@ -129,13 +110,11 @@ public class PacketHandler implements IPacketHandler world.spawnParticle("reddust", x + Math.random() - Math.random(), y + Math.random() - Math.random(), z + Math.random() - Math.random(), f1, f2, f3); } } - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } - } - else if (packet.channel.equals("CustomParticle")) + } else if (packet.channel.equals("CustomParticle")) { ByteArrayInputStream bin = new ByteArrayInputStream(packet.data); DataInputStream din = new DataInputStream(bin); @@ -143,7 +122,7 @@ public class PacketHandler implements IPacketHandler try { - World world = ((EntityPlayer)player).worldObj; + World world = ((EntityPlayer) player).worldObj; int size = din.readInt(); String str = ""; @@ -159,20 +138,18 @@ public class PacketHandler implements IPacketHandler double yVel = din.readDouble(); double zVel = din.readDouble(); world.spawnParticle(str, x, y, z, xVel, yVel, zVel); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } - } - else if (packet.channel.equals("SetLifeEssence")) //Sets the data for the character + } else if (packet.channel.equals("SetLifeEssence")) //Sets the data for the character { ByteArrayInputStream bin = new ByteArrayInputStream(packet.data); DataInputStream din = new DataInputStream(bin); try { - EntityPlayer user = (EntityPlayer)player; + EntityPlayer user = (EntityPlayer) player; int length = din.readInt(); String ownerName = ""; @@ -184,7 +161,7 @@ public class PacketHandler implements IPacketHandler int addedEssence = din.readInt(); int maxEssence = din.readInt(); World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName); + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); if (data == null) { @@ -215,8 +192,7 @@ public class PacketHandler implements IPacketHandler } } } - } - else + } else { int removedEssence = -addedEssence; @@ -224,8 +200,7 @@ public class PacketHandler implements IPacketHandler { data.currentEssence -= removedEssence; data.markDirty(); - } - else + } else { if (removedEssence >= 100) { @@ -241,8 +216,7 @@ public class PacketHandler implements IPacketHandler return; } } - } - else + } else { if (user.worldObj.rand.nextInt(100) <= removedEssence) { @@ -262,20 +236,18 @@ public class PacketHandler implements IPacketHandler //PacketDispatcher.sendPacketToPlayer(PacketHandler.getPacket(ownerName), (Player)user); // data.currentEssence = addedEssence; // data.markDirty(); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } - } - else if (packet.channel.equals("InfiniteLPPath")) + } else if (packet.channel.equals("InfiniteLPPath")) { ByteArrayInputStream bin = new ByteArrayInputStream(packet.data); DataInputStream din = new DataInputStream(bin); try { - EntityPlayer user = (EntityPlayer)player; + EntityPlayer user = (EntityPlayer) player; int length = din.readInt(); String ownerName = ""; @@ -286,7 +258,7 @@ public class PacketHandler implements IPacketHandler boolean fill = din.readBoolean(); World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName); + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); if (data == null) { @@ -298,8 +270,7 @@ public class PacketHandler implements IPacketHandler { data.currentEssence += 1000000; data.markDirty(); - } - else + } else { data.currentEssence = 0; data.markDirty(); @@ -308,13 +279,11 @@ public class PacketHandler implements IPacketHandler //PacketDispatcher.sendPacketToPlayer(PacketHandler.getPacket(ownerName), (Player)user); // data.currentEssence = addedEssence; // data.markDirty(); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } - } - else if (packet.channel.equals("GetLifeEssence")) + } else if (packet.channel.equals("GetLifeEssence")) { ByteArrayInputStream bin = new ByteArrayInputStream(packet.data); DataInputStream din = new DataInputStream(bin); @@ -330,7 +299,7 @@ public class PacketHandler implements IPacketHandler } World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName); + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); if (data == null) { @@ -340,19 +309,17 @@ public class PacketHandler implements IPacketHandler if (player instanceof EntityPlayer) { - EntityPlayer owner = (EntityPlayer)player; + EntityPlayer owner = (EntityPlayer) player; ChatMessageComponent chatmessagecomponent = new ChatMessageComponent(); //chatmessagecomponent.func_111072_b("Current Essence: " + data.currentEssence + "LP"); chatmessagecomponent.addText("Current Essence: " + data.currentEssence + "LP"); owner.sendChatToPlayer(chatmessagecomponent); } - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } - } - else if (packet.channel.equals("GetAltarEssence")) + } else if (packet.channel.equals("GetAltarEssence")) { ByteArrayInputStream bin = new ByteArrayInputStream(packet.data); DataInputStream din = new DataInputStream(bin); @@ -365,9 +332,9 @@ public class PacketHandler implements IPacketHandler if (player instanceof EntityPlayer) { - EntityPlayer owner = (EntityPlayer)player; + EntityPlayer owner = (EntityPlayer) player; World world = owner.worldObj; - TEAltar tileEntity = (TEAltar)world.getBlockTileEntity(x, y, z); + TEAltar tileEntity = (TEAltar) world.getBlockTileEntity(x, y, z); if (tileEntity != null) { @@ -378,13 +345,11 @@ public class PacketHandler implements IPacketHandler owner.sendChatToPlayer(chatmessagecomponent); } } - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } - } - else if (packet.channel.equals("TESocket")) + } else if (packet.channel.equals("TESocket")) { ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data); int x = dat.readInt(); @@ -411,8 +376,7 @@ public class PacketHandler implements IPacketHandler TESocket tileEntityAltar = (TESocket) tileEntity; tileEntityAltar.handlePacketData(items); } - } - else if (packet.channel.equals("TEWritingTable")) + } else if (packet.channel.equals("TEWritingTable")) { ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data); int x = dat.readInt(); @@ -439,8 +403,7 @@ public class PacketHandler implements IPacketHandler TEWritingTable tileEntityAltar = (TEWritingTable) tileEntity; tileEntityAltar.handlePacketData(items); } - } - else if (packet.channel.equals("TEOrientor")) + } else if (packet.channel.equals("TEOrientor")) { ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data); int x = dat.readInt(); @@ -455,8 +418,7 @@ public class PacketHandler implements IPacketHandler tileEntityOrientable.setInputDirection(ForgeDirection.getOrientation(dat.readInt())); tileEntityOrientable.setOutputDirection(ForgeDirection.getOrientation(dat.readInt())); } - } - else if (packet.channel.equals("TEPedestal")) + } else if (packet.channel.equals("TEPedestal")) { ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data); int x = dat.readInt(); @@ -483,8 +445,7 @@ public class PacketHandler implements IPacketHandler TEPedestal tileEntityAltar = (TEPedestal) tileEntity; tileEntityAltar.handlePacketData(items); } - } - else if (packet.channel.equals("TEPlinth")) + } else if (packet.channel.equals("TEPlinth")) { ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data); int x = dat.readInt(); @@ -511,8 +472,7 @@ public class PacketHandler implements IPacketHandler TEPlinth tileEntityAltar = (TEPlinth) tileEntity; tileEntityAltar.handlePacketData(items); } - } - else if (packet.channel.equals("TETeleposer")) + } else if (packet.channel.equals("TETeleposer")) { ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data); int x = dat.readInt(); @@ -539,22 +499,20 @@ public class PacketHandler implements IPacketHandler TETeleposer tileEntityAltar = (TETeleposer) tileEntity; tileEntityAltar.handlePacketData(items); } - } - else if (packet.channel.equals("SetPlayerVel")) + } else if (packet.channel.equals("SetPlayerVel")) { ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data); double xVel = dat.readDouble(); double yVel = dat.readDouble(); double zVel = dat.readDouble(); - ((EntityPlayer)player).setVelocity(xVel, yVel, zVel); - } - else if (packet.channel.equals("SetPlayerPos")) + ((EntityPlayer) player).setVelocity(xVel, yVel, zVel); + } else if (packet.channel.equals("SetPlayerPos")) { ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data); double xVel = dat.readDouble(); double yVel = dat.readDouble(); double zVel = dat.readDouble(); - ((EntityPlayer)player).setPosition(xVel, yVel, zVel); + ((EntityPlayer) player).setPosition(xVel, yVel, zVel); } } @@ -586,8 +544,7 @@ public class PacketHandler implements IPacketHandler { dos.writeInt(AlchemicalWizardry.lifeEssenceFluid.getBlockID()); dos.writeInt(0); - } - else + } else { dos.writeInt(flMain.fluidID); dos.writeInt(flMain.amount); @@ -599,8 +556,7 @@ public class PacketHandler implements IPacketHandler { dos.writeInt(AlchemicalWizardry.lifeEssenceFluid.getBlockID()); dos.writeInt(0); - } - else + } else { dos.writeInt(flOut.fluidID); dos.writeInt(flOut.amount); @@ -612,16 +568,14 @@ public class PacketHandler implements IPacketHandler { dos.writeInt(AlchemicalWizardry.lifeEssenceFluid.getBlockID()); dos.writeInt(0); - } - else + } else { dos.writeInt(flIn.fluidID); dos.writeInt(flIn.amount); } dos.writeInt(tileEntity.capacity); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -655,8 +609,7 @@ public class PacketHandler implements IPacketHandler dos.writeInt(items[i]); } } - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -681,8 +634,7 @@ public class PacketHandler implements IPacketHandler dos.writeChars(ownerName); dos.writeInt(addedEssence); dos.writeInt(maxEssence); //Used for Blood Orbs, but does nothing for other items - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -704,8 +656,7 @@ public class PacketHandler implements IPacketHandler { dos.writeInt(ownerName.length()); dos.writeChars(ownerName); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -728,8 +679,7 @@ public class PacketHandler implements IPacketHandler dos.writeInt(x); dos.writeInt(y); dos.writeInt(z); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -764,8 +714,7 @@ public class PacketHandler implements IPacketHandler dos.writeInt(items[i]); } } - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -800,8 +749,7 @@ public class PacketHandler implements IPacketHandler dos.writeInt(items[i]); } } - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -836,8 +784,7 @@ public class PacketHandler implements IPacketHandler dos.writeInt(items[i]); } } - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -872,8 +819,7 @@ public class PacketHandler implements IPacketHandler dos.writeInt(items[i]); } } - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -901,8 +847,7 @@ public class PacketHandler implements IPacketHandler dos.writeDouble(xVel); dos.writeDouble(yVel); dos.writeDouble(zVel); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -925,8 +870,7 @@ public class PacketHandler implements IPacketHandler dos.writeDouble(xVel); dos.writeDouble(yVel); dos.writeDouble(zVel); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -949,8 +893,7 @@ public class PacketHandler implements IPacketHandler dos.writeDouble(xVel); dos.writeDouble(yVel); dos.writeDouble(zVel); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -973,8 +916,7 @@ public class PacketHandler implements IPacketHandler dos.writeInt(ownerName.length()); dos.writeChars(ownerName); dos.writeBoolean(isFill); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -999,8 +941,7 @@ public class PacketHandler implements IPacketHandler dos.writeInt(tileEntity.zCoord); dos.writeInt(tileEntity.getIntForForgeDirection(tileEntity.getInputDirection())); dos.writeInt(tileEntity.getIntForForgeDirection(tileEntity.getOutputDirection())); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemicalPotionCreationHandler.java b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemicalPotionCreationHandler.java index ad054fe1..04819814 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemicalPotionCreationHandler.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemicalPotionCreationHandler.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.alchemy; -import java.util.ArrayList; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModItems; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; +import java.util.ArrayList; + public class AlchemicalPotionCreationHandler { public static ArrayList registeredPotionEffects = new ArrayList(); @@ -21,7 +22,7 @@ public class AlchemicalPotionCreationHandler addPotion(new ItemStack(Item.spiderEye), Potion.poison.id, 450); addPotion(new ItemStack(Item.fermentedSpiderEye), Potion.weakness.id, 450); addPotion(new ItemStack(Item.blazePowder), Potion.damageBoost.id, 2 * 60 * 20); - addPotion(new ItemStack(AlchemicalWizardry.aether), Potion.jump.id, 2 * 60 * 20); + addPotion(new ItemStack(ModItems.aether), Potion.jump.id, 2 * 60 * 20); addPotion(new ItemStack(Item.clay), Potion.moveSlowdown.id, 450); addPotion(new ItemStack(Item.redstone), Potion.digSpeed.id, 2 * 60 * 20); addPotion(new ItemStack(Item.potion, 1, 0), AlchemicalWizardry.customPotionDrowning.id, 450); @@ -29,9 +30,9 @@ public class AlchemicalPotionCreationHandler addPotion(new ItemStack(Item.glassBottle), Potion.invisibility.id, 2 * 60 * 20); addPotion(new ItemStack(Item.diamond), Potion.resistance.id, 2 * 60 * 20); addPotion(new ItemStack(Item.poisonousPotato), Potion.field_76443_y.id, 2); //saturation - addPotion(new ItemStack(AlchemicalWizardry.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost - addPotion(new ItemStack(AlchemicalWizardry.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption - addPotion(new ItemStack(AlchemicalWizardry.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20); + addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost + addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption + addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20); addPotion(new ItemStack(Item.feather), AlchemicalWizardry.customPotionFlight.id, 1 * 60 * 20); addPotion(new ItemStack(Item.arrow), AlchemicalWizardry.customPotionReciprocation.id, 1 * 60 * 20); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyPotionHandlerComponent.java b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyPotionHandlerComponent.java index 3f8b8749..d7f64ca0 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyPotionHandlerComponent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyPotionHandlerComponent.java @@ -26,8 +26,7 @@ public class AlchemyPotionHandlerComponent { return comparedStack.itemID == itemStack.itemID && comparedStack.getItemDamage() == itemStack.getItemDamage(); } - } - else if (!(itemStack.getItem() instanceof ItemBlock)) + } else if (!(itemStack.getItem() instanceof ItemBlock)) { return comparedStack.itemID == itemStack.itemID && comparedStack.getItemDamage() == itemStack.getItemDamage(); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyPotionHelper.java b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyPotionHelper.java index 8324cf17..47bcd609 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyPotionHelper.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyPotionHelper.java @@ -53,10 +53,10 @@ public class AlchemyPotionHelper { if (potionID == Potion.heal.id || potionID == Potion.harm.id) { - return(new PotionEffect(potionID, 1, concentration)); + return (new PotionEffect(potionID, 1, concentration)); } - return(new PotionEffect(potionID, (int)(tickDuration * Math.pow(0.5f, concentration) * Math.pow(8.0f / 3.0f, durationFactor)), concentration)); + return (new PotionEffect(potionID, (int) (tickDuration * Math.pow(0.5f, concentration) * Math.pow(8.0f / 3.0f, durationFactor)), concentration)); } public static AlchemyPotionHelper readEffectFromNBT(NBTTagCompound tagCompound) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipe.java b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipe.java index 168ba265..be25dac6 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipe.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipe.java @@ -42,16 +42,14 @@ public class AlchemyRecipe if (i + 1 > this.recipe.length) { newRecipe[i] = null; - } - else + } else { newRecipe[i] = this.recipe[i]; } } recipe = newRecipe; - } - else + } else { recipe = this.recipe; } @@ -96,8 +94,7 @@ public class AlchemyRecipe { quickTest = true; } - } - else if (!(checkedItemStack.getItem() instanceof ItemBlock)) + } else if (!(checkedItemStack.getItem() instanceof ItemBlock)) { quickTest = true; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipeRegistry.java b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipeRegistry.java index 690cf1e8..297697a0 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipeRegistry.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/AlchemyRecipeRegistry.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.alchemy; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import net.minecraft.item.ItemStack; + import java.util.ArrayList; import java.util.List; -import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; - public class AlchemyRecipeRegistry { public static List recipes = new ArrayList(); @@ -27,13 +27,13 @@ public class AlchemyRecipeRegistry return null; } - int bloodOrbLevel = ((EnergyBattery)bloodOrb.getItem()).getOrbLevel(); + int bloodOrbLevel = ((EnergyBattery) bloodOrb.getItem()).getOrbLevel(); for (AlchemyRecipe ar : recipes) { if (ar.doesRecipeMatch(recipe, bloodOrbLevel)) { - return(ar.getResult()); + return (ar.getResult()); } } @@ -52,13 +52,13 @@ public class AlchemyRecipeRegistry return 0; } - int bloodOrbLevel = ((EnergyBattery)bloodOrb.getItem()).getOrbLevel(); + int bloodOrbLevel = ((EnergyBattery) bloodOrb.getItem()).getOrbLevel(); for (AlchemyRecipe ar : recipes) { if (ar.doesRecipeMatch(recipe, bloodOrbLevel)) { - return(ar.getAmountNeeded()); + return (ar.getAmountNeeded()); } } @@ -67,7 +67,7 @@ public class AlchemyRecipeRegistry public static ItemStack[] getRecipeForItemStack(ItemStack itemStack) { - for (AlchemyRecipe ar: recipes) + for (AlchemyRecipe ar : recipes) { ItemStack result = ar.getResult(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/ArmourForge.java b/BM_src/WayofTime/alchemicalWizardry/common/block/ArmourForge.java index fd8e7914..439b4290 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/ArmourForge.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/ArmourForge.java @@ -1,14 +1,15 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.ArrayList; -import java.util.List; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.ArmourComponent; import WayofTime.alchemicalWizardry.common.ArmourUpgrade; +import WayofTime.alchemicalWizardry.common.ModItems; import WayofTime.alchemicalWizardry.common.items.BoundArmour; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -20,9 +21,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.ArrayList; +import java.util.List; public class ArmourForge extends Block { @@ -77,22 +78,22 @@ public class ArmourForge extends Block { case 0: list = plateList; - armourPiece = new ItemStack(AlchemicalWizardry.boundPlate.itemID, 1, 0); + armourPiece = new ItemStack(ModItems.boundPlate.itemID, 1, 0); break; case 1: list = leggingsList; - armourPiece = new ItemStack(AlchemicalWizardry.boundLeggings.itemID, 1, 0); + armourPiece = new ItemStack(ModItems.boundLeggings.itemID, 1, 0); break; case 2: list = helmetList; - armourPiece = new ItemStack(AlchemicalWizardry.boundHelmet.itemID, 1, 0); + armourPiece = new ItemStack(ModItems.boundHelmet.itemID, 1, 0); break; case 3: list = bootsList; - armourPiece = new ItemStack(AlchemicalWizardry.boundBoots.itemID, 1, 0); + armourPiece = new ItemStack(ModItems.boundBoots.itemID, 1, 0); break; } @@ -149,16 +150,16 @@ public class ArmourForge extends Block if (tileEntity instanceof TESocket) { - ItemStack itemStack = ((TESocket)tileEntity).getStackInSlot(0); + ItemStack itemStack = ((TESocket) tileEntity).getStackInSlot(0); int xCoord = tileEntity.xCoord; int yCoord = tileEntity.yCoord; int zCoord = tileEntity.zCoord; - ((TESocket)tileEntity).setInventorySlotContents(0, null); + ((TESocket) tileEntity).setInventorySlotContents(0, null); world.setBlockToAir(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); for (int i = 0; i < 8; i++) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, world.provider.dimensionId, TEAltar.getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, world.provider.dimensionId, TEAltar.getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); } if (itemStack != null) @@ -167,7 +168,7 @@ public class ArmourForge extends Block if (item instanceof ArmourUpgrade) { - ((BoundArmour)armourPiece.getItem()).hasAddedToInventory(armourPiece, itemStack.copy()); + ((BoundArmour) armourPiece.getItem()).hasAddedToInventory(armourPiece, itemStack.copy()); ((TESocket) tileEntity).setInventorySlotContents(0, null); } } @@ -177,7 +178,7 @@ public class ArmourForge extends Block if (armourPiece != null) { int xOff = (world.rand.nextInt(11) - 5); - int zOff = (int)(Math.sqrt(25 - xOff * xOff) * (world.rand.nextInt(2) - 0.5) * 2); + int zOff = (int) (Math.sqrt(25 - xOff * xOff) * (world.rand.nextInt(2) - 0.5) * 2); world.addWeatherEffect(new EntityLightningBolt(world, x + xOff, y + 5, z + zOff)); world.spawnEntityInWorld(new EntityItem(world, x, y + 1, z, armourPiece)); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockAltar.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockAltar.java index 3ac0d714..3fed6d34 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockAltar.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockAltar.java @@ -1,7 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModItems; +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -14,14 +21,8 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.Random; public class BlockAltar extends BlockContainer { @@ -33,6 +34,7 @@ public class BlockAltar extends BlockContainer private static Icon sideIcon2; @SideOnly(Side.CLIENT) private static Icon bottomIcon; + public BlockAltar(int id) { super(id, Material.rock); @@ -65,10 +67,10 @@ public class BlockAltar extends BlockContainer case 1: return topIcon; - //case 2: return sideIcon1; - //case 3: return sideIcon1; - //case 4: return sideIcon2; - //case 5: return sideIcon2; + //case 2: return sideIcon1; + //case 3: return sideIcon1; + //case 4: return sideIcon2; + //case 5: return sideIcon2; default: return sideIcon2; } @@ -77,7 +79,7 @@ public class BlockAltar extends BlockContainer @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TEAltar tileEntity = (TEAltar)world.getBlockTileEntity(x, y, z); + TEAltar tileEntity = (TEAltar) world.getBlockTileEntity(x, y, z); // world.scheduleBlockUpdate(x, y, z, this.blockID, 0); @@ -90,7 +92,7 @@ public class BlockAltar extends BlockContainer if (playerItem != null) { - if (playerItem.getItem().itemID == AlchemicalWizardry.divinationSigil.itemID) + if (playerItem.getItem().itemID == ModItems.divinationSigil.itemID) { if (player.worldObj.isRemote) { @@ -98,12 +100,11 @@ public class BlockAltar extends BlockContainer } return true; - } - else if (playerItem.getItem().itemID == AlchemicalWizardry.sigilOfHolding.itemID) + } else if (playerItem.getItem().itemID == ModItems.sigilOfHolding.itemID) { - ItemStack item = ((SigilOfHolding)playerItem.getItem()).getCurrentItem(playerItem); + ItemStack item = ((SigilOfHolding) playerItem.getItem()).getCurrentItem(playerItem); - if (item != null && item.getItem().itemID == AlchemicalWizardry.divinationSigil.itemID) + if (item != null && item.getItem().itemID == ModItems.divinationSigil.itemID) { if (player.worldObj.isRemote) { @@ -126,8 +127,7 @@ public class BlockAltar extends BlockContainer --playerItem.stackSize; tileEntity.setInventorySlotContents(0, newItem); tileEntity.startCycle(); - } - else if (tileEntity.getStackInSlot(0) != null && playerItem == null) + } else if (tileEntity.getStackInSlot(0) != null && playerItem == null) { /**stub method * Add the item that is in the slot to the player's inventory, and @@ -173,8 +173,8 @@ public class BlockAltar extends BlockContainer float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; EntityItem entityItem = new EntityItem(world, - x + rx, y + ry, z + rz, - new ItemStack(item.itemID, item.stackSize, item.getItemDamage())); + x + rx, y + ry, z + rz, + new ItemStack(item.itemID, item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -224,7 +224,7 @@ public class BlockAltar extends BlockContainer @Override public void randomDisplayTick(World world, int x, int y, int z, Random rand) { - TEAltar tileEntity = (TEAltar)world.getBlockTileEntity(x, y, z); + TEAltar tileEntity = (TEAltar) world.getBlockTileEntity(x, y, z); if (!tileEntity.isActive()) { @@ -260,15 +260,15 @@ public class BlockAltar extends BlockContainer // { // return 0; // } - ItemStack stack = ((TEAltar)tile).getStackInSlot(0); + ItemStack stack = ((TEAltar) tile).getStackInSlot(0); if (stack != null && stack.getItem() instanceof EnergyBattery) { - EnergyBattery bloodOrb = (EnergyBattery)stack.getItem(); + EnergyBattery bloodOrb = (EnergyBattery) stack.getItem(); int maxEssence = bloodOrb.getMaxEssence(); int currentEssence = bloodOrb.getCurrentEssence(stack); int level = currentEssence * 15 / maxEssence; - return((int)(Math.min(15, level))) % 16; + return ((int) (Math.min(15, level))) % 16; } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java index b70bc71d..71a89432 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.List; -import java.util.Random; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; @@ -13,6 +10,9 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import java.util.List; +import java.util.Random; + public class BlockBloodLightSource extends Block { public BlockBloodLightSource(int par1) @@ -52,7 +52,7 @@ public class BlockBloodLightSource extends Block { if (rand.nextInt(3) != 0) { - float f = (float)1.0F; + float f = (float) 1.0F; float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockConduit.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockConduit.java index c6e21df7..7d2bf5d3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockConduit.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockConduit.java @@ -2,6 +2,8 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -10,8 +12,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class BlockConduit extends BlockContainer { @@ -23,6 +23,7 @@ public class BlockConduit extends BlockContainer private static Icon sideIcon2; @SideOnly(Side.CLIENT) private static Icon bottomIcon; + public BlockConduit(int id) { super(id, Material.rock); @@ -55,10 +56,10 @@ public class BlockConduit extends BlockContainer case 1: return topIcon; - //case 2: return sideIcon1; - //case 3: return sideIcon1; - //case 4: return sideIcon2; - //case 5: return sideIcon2; + //case 2: return sideIcon1; + //case 3: return sideIcon1; + //case 4: return sideIcon2; + //case 5: return sideIcon2; default: return sideIcon2; } @@ -78,25 +79,22 @@ public class BlockConduit extends BlockContainer if (tile instanceof TEConduit) { //TODO NEEDS WORK - if (((TEConduit)tile).getInputDirection().equals(sideClicked)) + if (((TEConduit) tile).getInputDirection().equals(sideClicked)) { - ((TEConduit)tile).setInputDirection(((TEConduit)tile).getOutputDirection()); - ((TEConduit)tile).setOutputDirection(sideClicked); - } - else if (((TEConduit)tile).getOutputDirection().equals(sideClicked)) + ((TEConduit) tile).setInputDirection(((TEConduit) tile).getOutputDirection()); + ((TEConduit) tile).setOutputDirection(sideClicked); + } else if (((TEConduit) tile).getOutputDirection().equals(sideClicked)) { - ((TEConduit)tile).setOutputDirection(((TEConduit)tile).getInputDirection()); - ((TEConduit)tile).setInputDirection(sideClicked); - } - else + ((TEConduit) tile).setOutputDirection(((TEConduit) tile).getInputDirection()); + ((TEConduit) tile).setInputDirection(sideClicked); + } else { if (!player.isSneaking()) { - ((TEConduit)tile).setOutputDirection(sideClicked); - } - else + ((TEConduit) tile).setOutputDirection(sideClicked); + } else { - ((TEConduit)tile).setOutputDirection(sideClicked.getOpposite()); + ((TEConduit) tile).setOutputDirection(sideClicked.getOpposite()); } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java index c08f62c0..e0818179 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java @@ -1,5 +1,10 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.BlankSpell; +import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockGrass; import net.minecraft.block.material.Material; @@ -10,11 +15,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.BlankSpell; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class BlockHomHeart extends BlockContainer { @@ -52,10 +52,10 @@ public class BlockHomHeart extends BlockContainer case 1: return topIcon; - //case 2: return sideIcon1; - //case 3: return sideIcon1; - //case 4: return sideIcon2; - //case 5: return sideIcon2; + //case 2: return sideIcon1; + //case 3: return sideIcon1; + //case 4: return sideIcon2; + //case 5: return sideIcon2; default: return sideIcon; } @@ -64,7 +64,7 @@ public class BlockHomHeart extends BlockContainer @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TEHomHeart tileEntity = (TEHomHeart)world.getBlockTileEntity(x, y, z); + TEHomHeart tileEntity = (TEHomHeart) world.getBlockTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java index d099dce1..bb783cf9 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java @@ -1,5 +1,10 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -8,11 +13,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class BlockMasterStone extends BlockContainer { @@ -36,7 +36,7 @@ public class BlockMasterStone extends BlockContainer @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TEMasterStone tileEntity = (TEMasterStone)world.getBlockTileEntity(x, y, z); + TEMasterStone tileEntity = (TEMasterStone) world.getBlockTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -57,7 +57,7 @@ public class BlockMasterStone extends BlockContainer return false; } - ActivationCrystal acItem = (ActivationCrystal)item; + ActivationCrystal acItem = (ActivationCrystal) item; tileEntity.setOwner(acItem.getOwnerName(playerItem)); tileEntity.activateRitual(world, acItem.getCrystalLevel(playerItem)); world.markBlockForUpdate(x, y, z); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java index 0df133d2..d2731973 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java @@ -1,13 +1,12 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.Random; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -18,8 +17,8 @@ import net.minecraft.util.Icon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.Random; public class BlockPedestal extends BlockContainer { @@ -31,6 +30,7 @@ public class BlockPedestal extends BlockContainer private static Icon sideIcon2; @SideOnly(Side.CLIENT) private static Icon bottomIcon; + public BlockPedestal(int id) { super(id, Material.rock); @@ -63,10 +63,10 @@ public class BlockPedestal extends BlockContainer case 1: return topIcon; - //case 2: return sideIcon1; - //case 3: return sideIcon1; - //case 4: return sideIcon2; - //case 5: return sideIcon2; + //case 2: return sideIcon1; + //case 3: return sideIcon1; + //case 4: return sideIcon2; + //case 5: return sideIcon2; default: return sideIcon2; } @@ -75,7 +75,7 @@ public class BlockPedestal extends BlockContainer @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TEPedestal tileEntity = (TEPedestal)world.getBlockTileEntity(x, y, z); + TEPedestal tileEntity = (TEPedestal) world.getBlockTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -90,8 +90,7 @@ public class BlockPedestal extends BlockContainer newItem.stackSize = 1; --playerItem.stackSize; tileEntity.setInventorySlotContents(0, newItem); - } - else if (tileEntity.getStackInSlot(0) != null && playerItem == null) + } else if (tileEntity.getStackInSlot(0) != null && playerItem == null) { /**stub method * Add the item that is in the slot to the player's inventory, and diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java index ac5394f0..42752893 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java @@ -1,13 +1,12 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.Random; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -18,8 +17,8 @@ import net.minecraft.util.Icon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.Random; public class BlockPlinth extends BlockContainer { @@ -31,6 +30,7 @@ public class BlockPlinth extends BlockContainer private static Icon sideIcon2; @SideOnly(Side.CLIENT) private static Icon bottomIcon; + public BlockPlinth(int id) { super(id, Material.rock); @@ -63,10 +63,10 @@ public class BlockPlinth extends BlockContainer case 1: return topIcon; - //case 2: return sideIcon1; - //case 3: return sideIcon1; - //case 4: return sideIcon2; - //case 5: return sideIcon2; + //case 2: return sideIcon1; + //case 3: return sideIcon1; + //case 4: return sideIcon2; + //case 5: return sideIcon2; default: return sideIcon2; } @@ -75,7 +75,7 @@ public class BlockPlinth extends BlockContainer @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TEPlinth tileEntity = (TEPlinth)world.getBlockTileEntity(x, y, z); + TEPlinth tileEntity = (TEPlinth) world.getBlockTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -90,8 +90,7 @@ public class BlockPlinth extends BlockContainer newItem.stackSize = 1; --playerItem.stackSize; tileEntity.setInventorySlotContents(0, newItem); - } - else if (tileEntity.getStackInSlot(0) != null && playerItem == null) + } else if (tileEntity.getStackInSlot(0) != null && playerItem == null) { /**stub method * Add the item that is in the slot to the player's inventory, and diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockSocket.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockSocket.java index ff696132..67479b7a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockSocket.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockSocket.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.Random; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.ArmourUpgrade; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -16,8 +16,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.Random; public class BlockSocket extends BlockContainer { @@ -29,6 +29,7 @@ public class BlockSocket extends BlockContainer private static Icon sideIcon2; @SideOnly(Side.CLIENT) private static Icon bottomIcon; + public BlockSocket(int id) { super(id, Material.rock); @@ -61,10 +62,10 @@ public class BlockSocket extends BlockContainer case 1: return topIcon; - //case 2: return sideIcon1; - //case 3: return sideIcon1; - //case 4: return sideIcon2; - //case 5: return sideIcon2; + //case 2: return sideIcon1; + //case 3: return sideIcon1; + //case 4: return sideIcon2; + //case 5: return sideIcon2; default: return sideIcon2; } @@ -73,7 +74,7 @@ public class BlockSocket extends BlockContainer @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TESocket tileEntity = (TESocket)world.getBlockTileEntity(x, y, z); + TESocket tileEntity = (TESocket) world.getBlockTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -91,8 +92,7 @@ public class BlockSocket extends BlockContainer --playerItem.stackSize; tileEntity.setInventorySlotContents(0, newItem); } - } - else if (tileEntity.getStackInSlot(0) != null && playerItem == null) + } else if (tileEntity.getStackInSlot(0) != null && playerItem == null) { /**stub method * Add the item that is in the slot to the player's inventory, and diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java index 232dd1bf..2a192a39 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.Random; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockMobSpawner; @@ -18,8 +18,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.Random; public class BlockTeleposer extends BlockContainer { @@ -31,6 +31,7 @@ public class BlockTeleposer extends BlockContainer private static Icon sideIcon2; @SideOnly(Side.CLIENT) private static Icon bottomIcon; + public BlockTeleposer(int id) { super(id, Material.rock); @@ -63,10 +64,10 @@ public class BlockTeleposer extends BlockContainer case 1: return topIcon; - //case 2: return sideIcon1; - //case 3: return sideIcon1; - //case 4: return sideIcon2; - //case 5: return sideIcon2; + //case 2: return sideIcon1; + //case 3: return sideIcon1; + //case 4: return sideIcon2; + //case 5: return sideIcon2; default: return sideIcon2; } @@ -75,7 +76,7 @@ public class BlockTeleposer extends BlockContainer @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TETeleposer tileEntity = (TETeleposer)world.getBlockTileEntity(x, y, z); + TETeleposer tileEntity = (TETeleposer) world.getBlockTileEntity(x, y, z); ItemStack playerItem = player.getCurrentEquippedItem(); if (playerItem != null) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java index 013f3c6c..ce8c0e94 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.List; -import java.util.Random; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import cpw.mods.fml.relauncher.Side; @@ -10,7 +7,6 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -20,10 +16,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.Icon; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; import net.minecraft.world.World; +import java.util.List; +import java.util.Random; + public class BlockWritingTable extends BlockContainer { @SideOnly(Side.CLIENT) @@ -66,10 +63,10 @@ public class BlockWritingTable extends BlockContainer case 1: return topIcon; - //case 2: return sideIcon1; - //case 3: return sideIcon1; - //case 4: return sideIcon2; - //case 5: return sideIcon2; + //case 2: return sideIcon1; + //case 3: return sideIcon1; + //case 4: return sideIcon2; + //case 5: return sideIcon2; default: return sideIcon2; } @@ -119,8 +116,8 @@ public class BlockWritingTable extends BlockContainer float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; EntityItem entityItem = new EntityItem(world, - x + rx, y + ry, z + rz, - new ItemStack(item.itemID, item.stackSize, item.getItemDamage())); + x + rx, y + ry, z + rz, + new ItemStack(item.itemID, item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BloodRune.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BloodRune.java index 25ea9bf4..486ab09a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BloodRune.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BloodRune.java @@ -1,16 +1,17 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.List; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModBlocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class BloodRune extends Block { @@ -65,14 +66,13 @@ public class BloodRune extends Block */ public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) { - if (this.blockID == AlchemicalWizardry.bloodRune.blockID) + if (this.blockID == ModBlocks.bloodRune.blockID) { par3List.add(new ItemStack(par1, 1, 0)); par3List.add(new ItemStack(par1, 1, 1)); par3List.add(new ItemStack(par1, 1, 2)); par3List.add(new ItemStack(par1, 1, 3)); - } - else + } else { super.getSubBlocks(par1, par2CreativeTabs, par3List); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java b/BM_src/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java index 528292ac..939a5a5e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java @@ -6,7 +6,6 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; public class BloodStoneBrick extends Block { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java b/BM_src/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java index cfbbf964..f8512011 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java @@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; public class EfficiencyRune extends BloodRune { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/EmptySocket.java b/BM_src/WayofTime/alchemicalWizardry/common/block/EmptySocket.java index eef69c4f..17852c3a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/EmptySocket.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/EmptySocket.java @@ -6,7 +6,6 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; public class EmptySocket extends Block { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/IOrientable.java b/BM_src/WayofTime/alchemicalWizardry/common/block/IOrientable.java index d203bfec..22aca9cb 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/IOrientable.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/IOrientable.java @@ -5,8 +5,10 @@ import net.minecraftforge.common.ForgeDirection; public interface IOrientable { public ForgeDirection getInputDirection(); + public ForgeDirection getOutputDirection(); public void setInputDirection(ForgeDirection direction); + public void setOutputDirection(ForgeDirection direction); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java b/BM_src/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java index 5eb2c221..e394db2f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java @@ -6,20 +6,13 @@ import cpw.mods.fml.common.network.PacketDispatcher; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class ImperfectRitualStone extends Block @@ -76,8 +69,7 @@ public class ImperfectRitualStone extends Block world.getWorldInfo().setThunderTime(0); world.getWorldInfo().setThundering(true); return true; - } - else if (blockID == Block.coalBlock.blockID) + } else if (blockID == Block.coalBlock.blockID) { if (!player.capabilities.isCreativeMode && world.isRemote) { @@ -107,8 +99,7 @@ public class ImperfectRitualStone extends Block } return true; - } - else if (blockID == Block.blockLapis.blockID) + } else if (blockID == Block.blockLapis.blockID) { if (!player.capabilities.isCreativeMode && world.isRemote) { @@ -124,8 +115,7 @@ public class ImperfectRitualStone extends Block // PacketDispatcher.sendPacketToServer(PacketHandler.getPacket(player.getEntityName(), -5000, 0)); // } } - } - else if (blockID == Block.bedrock.blockID) + } else if (blockID == Block.bedrock.blockID) { if (!player.capabilities.isCreativeMode && world.isRemote) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java b/BM_src/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java index 27f36f61..8cacc6a1 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java @@ -6,7 +6,6 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; public class LargeBloodStoneBrick extends Block { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java b/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java index 1c6d3bff..52550968 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java @@ -1,14 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class LifeEssenceBlock extends BlockFluidClassic { @@ -37,7 +37,7 @@ public class LifeEssenceBlock extends BlockFluidClassic @Override public boolean canDisplace(IBlockAccess world, int x, int y, int z) { - if (world.getBlockMaterial(x, y, z).isLiquid()) + if (world.getBlockMaterial(x, y, z).isLiquid()) { return false; } @@ -48,7 +48,7 @@ public class LifeEssenceBlock extends BlockFluidClassic @Override public boolean displaceIfPossible(World world, int x, int y, int z) { - if (world.getBlockMaterial(x, y, z).isLiquid()) + if (world.getBlockMaterial(x, y, z).isLiquid()) { return false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceFlowing.java b/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceFlowing.java index 901bfa6d..a4930ce1 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceFlowing.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceFlowing.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.block; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockFlowing; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.Icon; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class LifeEssenceFlowing extends BlockFlowing { @@ -24,9 +24,9 @@ public class LifeEssenceFlowing extends BlockFlowing public void registerIcons(IconRegister iconRegister) { this.theIcon = new Icon[] - { - iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceStill"), - iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceFlowing") - }; + { + iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceStill"), + iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceFlowing") + }; } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceStill.java b/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceStill.java index 30ffea5b..aa0f4bab 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceStill.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/LifeEssenceStill.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockStationary; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.Icon; public class LifeEssenceStill extends BlockStationary @@ -25,9 +24,9 @@ public class LifeEssenceStill extends BlockStationary public void registerIcons(IconRegister iconRegister) { this.theIcon = new Icon[] - { - iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceStill"), - iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceFlowing") - }; + { + iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceStill"), + iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceFlowing") + }; } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/RitualStone.java b/BM_src/WayofTime/alchemicalWizardry/common/block/RitualStone.java index 88f5ef93..19db427a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/RitualStone.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/RitualStone.java @@ -1,5 +1,9 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.ScribeTool; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -8,10 +12,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.ScribeTool; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class RitualStone extends Block { @@ -77,7 +77,7 @@ public class RitualStone extends Block return false; } - ScribeTool scribeTool = (ScribeTool)item; + ScribeTool scribeTool = (ScribeTool) item; if (!player.capabilities.isCreativeMode) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java b/BM_src/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java index a4a71511..bf20639a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java @@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; public class RuneOfSacrifice extends BloodRune { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java b/BM_src/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java index 1f7acd3e..03594c8b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java @@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; public class RuneOfSelfSacrifice extends BloodRune { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java b/BM_src/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java index 2f7cf412..ae072124 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java @@ -1,18 +1,16 @@ package WayofTime.alchemicalWizardry.common.block; -import java.util.Random; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; -import net.minecraft.block.BlockLeaves; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.Random; public class SpectralBlock extends Block { @@ -89,8 +87,7 @@ public class SpectralBlock extends Block } return true; - } - else + } else { return false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/block/SpeedRune.java b/BM_src/WayofTime/alchemicalWizardry/common/block/SpeedRune.java index 7bbe6b55..32193d1a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/block/SpeedRune.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/block/SpeedRune.java @@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; public class SpeedRune extends BloodRune { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java b/BM_src/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java index fe0793e0..acdede16 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java @@ -4,7 +4,7 @@ public class AltarUpgradeComponent { private int speedUpgrades; private int efficiencyUpgrades; - private int sacrificeUpgrades ; + private int sacrificeUpgrades; private int selfSacrificeUpgrades; private int displacementUpgrades; private int altarCapacitiveUpgrades; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java b/BM_src/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java index 20afe210..425df00f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java @@ -1,13 +1,14 @@ package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModBlocks; +import WayofTime.alchemicalWizardry.common.block.BloodRune; +import net.minecraft.block.Block; +import net.minecraft.world.World; + import java.util.ArrayList; import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.block.BloodRune; - public class UpgradedAltars { public static List secondTierAltar = new ArrayList(); @@ -47,8 +48,7 @@ public class UpgradedAltars { return false; } - } - else + } else { int blockId = world.getBlockId(x + ac.getX(), y + ac.getY(), z + ac.getZ()); int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); @@ -73,8 +73,7 @@ public class UpgradedAltars { return false; } - } - else + } else { int blockId = world.getBlockId(x + ac.getX(), y + ac.getY(), z + ac.getZ()); int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); @@ -99,8 +98,7 @@ public class UpgradedAltars { return false; } - } - else + } else { int blockId = world.getBlockId(x + ac.getX(), y + ac.getY(), z + ac.getZ()); int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); @@ -125,8 +123,7 @@ public class UpgradedAltars { return false; } - } - else + } else { int blockId = world.getBlockId(x + ac.getX(), y + ac.getY(), z + ac.getZ()); int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); @@ -150,7 +147,7 @@ public class UpgradedAltars AltarUpgradeComponent upgrades = new AltarUpgradeComponent(); List list = UpgradedAltars.getAltarUpgradeListForTier(altarTier); - for (AltarComponent ac: list) + for (AltarComponent ac : list) { if (ac.isUpgradeSlot()) { @@ -162,7 +159,7 @@ public class UpgradedAltars { if (!world.isRemote) { - switch (((BloodRune)testBlock).getRuneEffect(world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) + switch (((BloodRune) testBlock).getRuneEffect(world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) { case 1: upgrades.addSpeedUpgrade(); @@ -257,10 +254,10 @@ public class UpgradedAltars fourthTierAltar.add(new AltarComponent(-5, i, 5, Block.stoneBrick.blockID, 0, false, false)); } - fourthTierAltar.add(new AltarComponent(5, 2, 5, AlchemicalWizardry.largeBloodStoneBrick.blockID, 0, false, false)); - fourthTierAltar.add(new AltarComponent(5, 2, -5, AlchemicalWizardry.largeBloodStoneBrick.blockID, 0, false, false)); - fourthTierAltar.add(new AltarComponent(-5, 2, -5, AlchemicalWizardry.largeBloodStoneBrick.blockID, 0, false, false)); - fourthTierAltar.add(new AltarComponent(-5, 2, 5, AlchemicalWizardry.largeBloodStoneBrick.blockID, 0, false, false)); + fourthTierAltar.add(new AltarComponent(5, 2, 5, ModBlocks.largeBloodStoneBrick.blockID, 0, false, false)); + fourthTierAltar.add(new AltarComponent(5, 2, -5, ModBlocks.largeBloodStoneBrick.blockID, 0, false, false)); + fourthTierAltar.add(new AltarComponent(-5, 2, -5, ModBlocks.largeBloodStoneBrick.blockID, 0, false, false)); + fourthTierAltar.add(new AltarComponent(-5, 2, 5, ModBlocks.largeBloodStoneBrick.blockID, 0, false, false)); fifthTierAltar.addAll(fourthTierAltar); fifthTierAltar.add(new AltarComponent(-8, -3, 8, Block.beacon.blockID, 0, false, false)); fifthTierAltar.add(new AltarComponent(-8, -3, -8, Block.beacon.blockID, 0, false, false)); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java index 2fe04844..970e9c87 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java @@ -1,26 +1,17 @@ package WayofTime.alchemicalWizardry.common.entity.mob; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModItems; import net.minecraft.block.BlockColored; -import net.minecraft.client.model.ModelIronGolem; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -75,8 +66,7 @@ public class EntityBileDemon extends EntityDemon if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -102,8 +92,7 @@ public class EntityBileDemon extends EntityDemon if (par1EntityLivingBase == null) { this.setAngry(false); - } - else if (!this.isTamed()) + } else if (!this.isTamed()) { this.setAngry(true); } @@ -121,8 +110,8 @@ public class EntityBileDemon extends EntityDemon { super.entityInit(); this.dataWatcher.addObject(18, new Float(this.getHealth())); - this.dataWatcher.addObject(19, new Byte((byte)0)); - this.dataWatcher.addObject(20, new Byte((byte)BlockColored.getBlockFromDye(1))); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); } /** @@ -140,8 +129,8 @@ public class EntityBileDemon extends EntityDemon { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("CollarColor", (byte)this.getCollarColor()); - par1NBTTagCompound.setByte("attackTimer", (byte)attackTimer); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); + par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); } /** @@ -249,8 +238,7 @@ public class EntityBileDemon extends EntityDemon if (this.isEntityInvulnerable()) { return false; - } - else + } else { Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); @@ -267,8 +255,8 @@ public class EntityBileDemon extends EntityDemon public boolean attackEntityAsMob(Entity par1Entity) { this.attackTimer = 10; - this.worldObj.setEntityState(this, (byte)4); - boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)(7 + this.rand.nextInt(15))); + this.worldObj.setEntityState(this, (byte) 4); + boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); if (flag) { @@ -286,8 +274,7 @@ public class EntityBileDemon extends EntityDemon if (par1) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -306,7 +293,7 @@ public class EntityBileDemon extends EntityDemon { if (Item.itemsList[itemstack.itemID] instanceof ItemFood) { - ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID]; + ItemFood itemfood = (ItemFood) Item.itemsList[itemstack.itemID]; if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < this.maxTamedHealth) { @@ -315,11 +302,11 @@ public class EntityBileDemon extends EntityDemon --itemstack.stackSize; } - this.heal((float)itemfood.getHealAmount()); + this.heal((float) itemfood.getHealAmount()); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } return true; @@ -327,21 +314,20 @@ public class EntityBileDemon extends EntityDemon } } - if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) + if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) { if (!this.worldObj.isRemote) { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; - this.setPathToEntity((PathEntity)null); - this.setTarget((Entity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); } this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); } - } - else if (itemstack != null && itemstack.itemID == AlchemicalWizardry.weakBloodOrb.itemID && !this.isAngry()) + } else if (itemstack != null && itemstack.itemID == ModItems.weakBloodOrb.itemID && !this.isAngry()) { if (!par1EntityPlayer.capabilities.isCreativeMode) { @@ -350,7 +336,7 @@ public class EntityBileDemon extends EntityDemon if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) @@ -358,18 +344,17 @@ public class EntityBileDemon extends EntityDemon if (this.rand.nextInt(1) == 0) { this.setTamed(true); - this.setPathToEntity((PathEntity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); this.aiSit.setSitting(true); this.setHealth(this.maxTamedHealth); this.setOwner(par1EntityPlayer.getCommandSenderName()); this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte)7); - } - else + this.worldObj.setEntityState(this, (byte) 7); + } else { this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte)6); + this.worldObj.setEntityState(this, (byte) 6); } } @@ -406,11 +391,10 @@ public class EntityBileDemon extends EntityDemon if (par1) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } - else + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); } } @@ -427,7 +411,7 @@ public class EntityBileDemon extends EntityDemon */ public void setCollarColor(int par1) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte)(par1 & 15))); + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); } /** @@ -442,11 +426,10 @@ public class EntityBileDemon extends EntityDemon { if (par1) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)1)); - } - else + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)0)); + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); } } @@ -478,7 +461,7 @@ public class EntityBileDemon extends EntityDemon { if (par1EntityLivingBase instanceof EntityBileDemon) { - EntityBileDemon entitywolf = (EntityBileDemon)par1EntityLivingBase; + EntityBileDemon entitywolf = (EntityBileDemon) par1EntityLivingBase; if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) { @@ -486,9 +469,8 @@ public class EntityBileDemon extends EntityDemon } } - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame(); - } - else + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else { return false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java index 043cc7b7..fac7e624 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java @@ -1,64 +1,19 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import java.util.Calendar; -import java.util.UUID; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.ModItems; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import cpw.mods.fml.common.network.Player; -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; import net.minecraft.block.BlockColored; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EntityLivingData; -import net.minecraft.entity.EntityOwnable; -import net.minecraft.entity.EnumCreatureAttribute; -import net.minecraft.entity.IRangedAttackMob; import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIBeg; -import net.minecraft.entity.ai.EntityAIBreakDoor; -import net.minecraft.entity.ai.EntityAIFleeSun; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILeapAtTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIMate; -import net.minecraft.entity.ai.EntityAIMoveThroughVillage; -import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAIPanic; -import net.minecraft.entity.ai.EntityAIRestrictSun; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAITargetNonTamed; -import net.minecraft.entity.ai.EntityAITempt; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.ai.attributes.Attribute; -import net.minecraft.entity.ai.attributes.AttributeInstance; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.ai.attributes.RangedAttribute; +import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.entity.passive.EntityTameable; -import net.minecraft.entity.passive.EntityVillager; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -67,13 +22,8 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.pathfinding.PathEntity; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.stats.AchievementList; import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraft.world.WorldProviderHell; public class EntityBoulderFist extends EntityDemon { @@ -125,8 +75,7 @@ public class EntityBoulderFist extends EntityDemon if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -152,8 +101,7 @@ public class EntityBoulderFist extends EntityDemon if (par1EntityLivingBase == null) { this.setAngry(false); - } - else if (!this.isTamed()) + } else if (!this.isTamed()) { this.setAngry(true); } @@ -171,8 +119,8 @@ public class EntityBoulderFist extends EntityDemon { super.entityInit(); this.dataWatcher.addObject(18, new Float(this.getHealth())); - this.dataWatcher.addObject(19, new Byte((byte)0)); - this.dataWatcher.addObject(20, new Byte((byte)BlockColored.getBlockFromDye(1))); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); } /** @@ -190,7 +138,7 @@ public class EntityBoulderFist extends EntityDemon { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("CollarColor", (byte)this.getCollarColor()); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); } /** @@ -289,8 +237,7 @@ public class EntityBoulderFist extends EntityDemon if (this.isEntityInvulnerable()) { return false; - } - else + } else { Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); @@ -307,7 +254,7 @@ public class EntityBoulderFist extends EntityDemon public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 6 : 7; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)i); + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); } public void setTamed(boolean par1) @@ -317,8 +264,7 @@ public class EntityBoulderFist extends EntityDemon if (par1) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -337,7 +283,7 @@ public class EntityBoulderFist extends EntityDemon { if (Item.itemsList[itemstack.itemID] instanceof ItemFood) { - ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID]; + ItemFood itemfood = (ItemFood) Item.itemsList[itemstack.itemID]; if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < this.maxTamedHealth) { @@ -346,11 +292,11 @@ public class EntityBoulderFist extends EntityDemon --itemstack.stackSize; } - this.heal((float)itemfood.getHealAmount()); + this.heal((float) itemfood.getHealAmount()); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } return true; @@ -358,21 +304,20 @@ public class EntityBoulderFist extends EntityDemon } } - if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) + if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) { if (!this.worldObj.isRemote) { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; - this.setPathToEntity((PathEntity)null); - this.setTarget((Entity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); } this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); } - } - else if (itemstack != null && itemstack.itemID == AlchemicalWizardry.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) + } else if (itemstack != null && itemstack.itemID == ModItems.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) { if (!par1EntityPlayer.capabilities.isCreativeMode) { @@ -381,7 +326,7 @@ public class EntityBoulderFist extends EntityDemon if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) @@ -389,18 +334,17 @@ public class EntityBoulderFist extends EntityDemon if (this.rand.nextInt(1) == 0) { this.setTamed(true); - this.setPathToEntity((PathEntity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); this.aiSit.setSitting(true); this.setHealth(this.maxTamedHealth); this.setOwner(par1EntityPlayer.getCommandSenderName()); this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte)7); - } - else + this.worldObj.setEntityState(this, (byte) 7); + } else { this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte)6); + this.worldObj.setEntityState(this, (byte) 6); } } @@ -437,11 +381,10 @@ public class EntityBoulderFist extends EntityDemon if (par1) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } - else + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); } } @@ -458,7 +401,7 @@ public class EntityBoulderFist extends EntityDemon */ public void setCollarColor(int par1) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte)(par1 & 15))); + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); } /** @@ -473,11 +416,10 @@ public class EntityBoulderFist extends EntityDemon { if (par1) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)1)); - } - else + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)0)); + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); } } @@ -509,7 +451,7 @@ public class EntityBoulderFist extends EntityDemon { if (par1EntityLivingBase instanceof EntityBoulderFist) { - EntityBoulderFist entitywolf = (EntityBoulderFist)par1EntityLivingBase; + EntityBoulderFist entitywolf = (EntityBoulderFist) par1EntityLivingBase; if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) { @@ -517,9 +459,8 @@ public class EntityBoulderFist extends EntityDemon } } - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame(); - } - else + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else { return false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java index c9b67d29..84dc7add 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java @@ -1,14 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob; +import WayofTime.alchemicalWizardry.common.IDemon; +import WayofTime.alchemicalWizardry.common.ModItems; +import WayofTime.alchemicalWizardry.common.items.DemonPlacer; +import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.ChatMessageComponent; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.IDemon; -import WayofTime.alchemicalWizardry.common.items.DemonPlacer; public class EntityDemon extends EntityTameable implements IDemon { @@ -48,7 +49,7 @@ public class EntityDemon extends EntityTameable implements IDemon protected void dropFewItems(boolean par1, int par2) { - ItemStack drop = new ItemStack(AlchemicalWizardry.demonPlacer, 1, this.getDemonID()); + ItemStack drop = new ItemStack(ModItems.demonPlacer, 1, this.getDemonID()); DemonPlacer.setOwnerName(drop, this.getOwnerName()); if (this.hasCustomNameTag()) @@ -78,8 +79,7 @@ public class EntityDemon extends EntityTameable implements IDemon if (isSitting) { chatmessagecomponent.addText("I will stay here for now, Master."); - } - else + } else { chatmessagecomponent.addText("I shall follow and protect you!"); } @@ -92,4 +92,10 @@ public class EntityDemon extends EntityTameable implements IDemon { return this.demonID; } + + @Override + public Entity getOwner() + { + return func_130012_q(); + } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java index 8c4e0d42..41624b3a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityEarthElemental.java @@ -20,9 +20,9 @@ public class EntityEarthElemental extends EntityElemental implements IMob { if (target instanceof EntityLivingBase) { - ((EntityLivingBase)target).attackEntityFrom(DamageSource.causeMobDamage(this), 10); - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 4)); - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); + ((EntityLivingBase) target).attackEntityFrom(DamageSource.causeMobDamage(this), 10); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 4)); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); } } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java index e37ecb50..4f3e3411 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java @@ -1,27 +1,16 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import java.util.List; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockColored; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.passive.EntityAnimal; @@ -29,20 +18,16 @@ import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.entity.projectile.EntityLargeFireball; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.pathfinding.PathEntity; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; -import net.minecraft.util.Vec3; import net.minecraft.world.World; +import java.util.List; + public class EntityElemental extends EntityDemon { //private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F); @@ -73,33 +58,40 @@ public class EntityElemental extends EntityDemon public double waypointZ; private Entity targetedEntity; - /** Cooldown time between target loss and new target aquirement. */ + /** + * Cooldown time between target loss and new target aquirement. + */ private int aggroCooldown; public int prevAttackCounter; public int attackCounter; - /** The explosion radius of spawned fireballs. */ + /** + * The explosion radius of spawned fireballs. + */ //private int explosionStrength = 1; // // private int heightOffsetUpdateTime; // private float heightOffset = 0.5F; // private int field_70846_g; - protected void dropFewItems(boolean par1, int par2) { if (worldObj.rand.nextFloat() < (1 - Math.pow(0.6f, par2 + 1))) { - this.entityDropItem(new ItemStack(AlchemicalWizardry.demonBloodShard, 1, 0), 0.0f); + this.entityDropItem(new ItemStack(ModItems.demonBloodShard, 1, 0), 0.0f); } } - protected void fall(float par1) {} + protected void fall(float par1) + { + } /** * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround */ - protected void updateFallState(double par1, boolean par3) {} + protected void updateFallState(double par1, boolean par3) + { + } /** * Moves the entity based on the specified heading. Args: strafe, forward @@ -113,16 +105,14 @@ public class EntityElemental extends EntityDemon this.motionX *= 0.800000011920929D; this.motionY *= 0.800000011920929D; this.motionZ *= 0.800000011920929D; - } - else if (this.handleLavaMovement()) + } else if (this.handleLavaMovement()) { this.moveFlying(par1, par2, 0.02F); this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.5D; this.motionY *= 0.5D; this.motionZ *= 0.5D; - } - else + } else { float f2 = 0.91F; @@ -153,9 +143,9 @@ public class EntityElemental extends EntityDemon } this.moveEntity(this.motionX, this.motionY, this.motionZ); - this.motionX *= (double)f2; - this.motionY *= (double)f2; - this.motionZ *= (double)f2; + this.motionX *= (double) f2; + this.motionY *= (double) f2; + this.motionZ *= (double) f2; } double d0 = this.posX - this.prevPosX; @@ -203,27 +193,26 @@ public class EntityElemental extends EntityDemon if (d3 < 1.0D || d3 > 3600.0D) { - this.waypointX = this.posX + (double)((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointY = this.posY + (double)((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointZ = this.posZ + (double)((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); } if (this.courseChangeCooldown-- <= 0) { this.courseChangeCooldown += this.rand.nextInt(5) + 2; - d3 = (double)MathHelper.sqrt_double(d3); + d3 = (double) MathHelper.sqrt_double(d3); if (this.isCourseTraversable(this.waypointX, this.waypointY, this.waypointZ, d3)) { this.motionX += d0 / d3 * 0.1D; this.motionY += d1 / d3 * 0.1D; this.motionZ += d2 / d3 * 0.1D; - } - else + } else { - this.waypointX = this.posX + (double)((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointY = this.posY + (double)((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointZ = this.posZ + (double)((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); } } @@ -247,9 +236,9 @@ public class EntityElemental extends EntityDemon if (this.targetedEntity != null && this.targetedEntity.getDistanceSqToEntity(this) < d4 * d4) { double d5 = this.targetedEntity.posX - this.posX; - double d6 = this.targetedEntity.boundingBox.minY + (double)(this.targetedEntity.height / 2.0F) - (this.posY + (double)(this.height / 2.0F)); + double d6 = this.targetedEntity.boundingBox.minY + (double) (this.targetedEntity.height / 2.0F) - (this.posY + (double) (this.height / 2.0F)); double d7 = this.targetedEntity.posZ - this.posZ; - this.renderYawOffset = this.rotationYaw = -((float)Math.atan2(d5, d7)) * 180.0F / (float)Math.PI; + this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(d5, d7)) * 180.0F / (float) Math.PI; if (this.courseChangeCooldown <= 0) { @@ -261,12 +250,11 @@ public class EntityElemental extends EntityDemon this.motionX += d5 / d3 * 0.1D; this.motionY += d6 / d3 * 0.1D; this.motionZ += d7 / d3 * 0.1D; - } - else + } else { - this.waypointX = this.posX + (double)((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointY = this.posY + (double)((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointZ = this.posZ + (double)((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); this.motionX += d5 / d3 * 0.1D; this.motionY += d6 / d3 * 0.1D; this.motionZ += d7 / d3 * 0.1D; @@ -285,20 +273,18 @@ public class EntityElemental extends EntityDemon if (this.attackCounter >= 10) { - this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1008, (int)this.posX, (int)this.posY, (int)this.posZ, 0); + this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1008, (int) this.posX, (int) this.posY, (int) this.posZ, 0); this.inflictEffectOnEntity(this.targetedEntity); this.attackCounter = -40; } } - } - else if (this.attackCounter > 0) + } else if (this.attackCounter > 0) { --this.attackCounter; } - } - else + } else { - this.renderYawOffset = this.rotationYaw = -((float)Math.atan2(this.motionX, this.motionZ)) * 180.0F / (float)Math.PI; + this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(this.motionX, this.motionZ)) * 180.0F / (float) Math.PI; if (this.attackCounter > 0) { @@ -309,7 +295,7 @@ public class EntityElemental extends EntityDemon if (!this.worldObj.isRemote) { byte b0 = this.dataWatcher.getWatchableObjectByte(25); - byte b1 = (byte)(this.attackCounter > 10 ? 1 : 0); + byte b1 = (byte) (this.attackCounter > 10 ? 1 : 0); if (b0 != b1) { @@ -328,7 +314,7 @@ public class EntityElemental extends EntityDemon double d6 = (this.waypointZ - this.posZ) / par7; AxisAlignedBB axisalignedbb = this.boundingBox.copy(); - for (int i = 1; (double)i < par7; ++i) + for (int i = 1; (double) i < par7; ++i) { axisalignedbb.offset(d4, d5, d6); @@ -356,7 +342,7 @@ public class EntityElemental extends EntityDemon { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("CollarColor", (byte)this.getCollarColor()); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); } /** @@ -386,8 +372,7 @@ public class EntityElemental extends EntityDemon if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -413,8 +398,7 @@ public class EntityElemental extends EntityDemon if (par1EntityLivingBase == null) { this.setAngry(false); - } - else if (!this.isTamed()) + } else if (!this.isTamed()) { this.setAngry(true); } @@ -432,9 +416,9 @@ public class EntityElemental extends EntityDemon { super.entityInit(); this.dataWatcher.addObject(18, new Float(this.getHealth())); - this.dataWatcher.addObject(19, new Byte((byte)0)); - this.dataWatcher.addObject(20, new Byte((byte)BlockColored.getBlockFromDye(1))); - this.dataWatcher.addObject(25, Byte.valueOf((byte)0)); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); + this.dataWatcher.addObject(25, Byte.valueOf((byte) 0)); } /** @@ -525,8 +509,7 @@ public class EntityElemental extends EntityDemon if (this.isEntityInvulnerable()) { return false; - } - else + } else { Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); @@ -543,7 +526,7 @@ public class EntityElemental extends EntityDemon public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 6 : 7; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)i); + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); } public void setTamed(boolean par1) @@ -553,8 +536,7 @@ public class EntityElemental extends EntityDemon if (par1) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -591,11 +573,10 @@ public class EntityElemental extends EntityDemon if (par1) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } - else + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); } } @@ -612,7 +593,7 @@ public class EntityElemental extends EntityDemon */ public void setCollarColor(int par1) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte)(par1 & 15))); + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); } /** @@ -627,11 +608,10 @@ public class EntityElemental extends EntityDemon { if (par1) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)1)); - } - else + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)0)); + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); } } @@ -664,7 +644,7 @@ public class EntityElemental extends EntityDemon { if (par1EntityLivingBase instanceof EntityBoulderFist) { - EntityBoulderFist entitywolf = (EntityBoulderFist)par1EntityLivingBase; + EntityBoulderFist entitywolf = (EntityBoulderFist) par1EntityLivingBase; if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) { @@ -672,10 +652,9 @@ public class EntityElemental extends EntityDemon } } - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame(); + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); //return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).func_96122_a((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).func_110248_bS(); - } - else + } else { return false; } @@ -704,30 +683,30 @@ public class EntityElemental extends EntityDemon ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 0)); } } - + public static Entity getClosestVulnerableMonsterToEntity(Entity par1Entity, double par2) { - double d4 = -1.0D; - double par1 = par1Entity.posX; - double par3 = par1Entity.posY; - double par5 = par1Entity.posZ; - + double d4 = -1.0D; + double par1 = par1Entity.posX; + double par3 = par1Entity.posY; + double par5 = par1Entity.posZ; + EntityLivingBase entityLiving = null; World world = par1Entity.worldObj; double range = Math.sqrt(par2); double verticalRange = Math.sqrt(par2); List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(par1 - 0.5f, par3 - 0.5f, par5 - 0.5f, par1 + 0.5f, par3 + 0.5f, par5 + 0.5f).expand(range, verticalRange, range)); - if(entities == null) + if (entities == null) { - return null; + return null; } - + for (int i = 0; i < entities.size(); ++i) { EntityLivingBase entityLiving1 = entities.get(i); - if (!(entityLiving1 instanceof EntityPlayer && ((EntityPlayer)entityLiving1).capabilities.disableDamage) && entityLiving1.isEntityAlive()) + if (!(entityLiving1 instanceof EntityPlayer && ((EntityPlayer) entityLiving1).capabilities.disableDamage) && entityLiving1.isEntityAlive()) { double d5 = entityLiving1.getDistanceSq(par1, par3, par5); double d6 = par2; @@ -739,30 +718,30 @@ public class EntityElemental extends EntityDemon if (entityLiving1.isInvisible()) { - float f = entityLiving1 instanceof EntityPlayer ? ((EntityPlayer)entityLiving1).getArmorVisibility() : 1.0f; + float f = entityLiving1 instanceof EntityPlayer ? ((EntityPlayer) entityLiving1).getArmorVisibility() : 1.0f; if (f < 0.1F) { f = 0.1F; } - d6 *= (double)(0.7F * f); + d6 *= (double) (0.7F * f); } if ((par2 < 0.0D || d5 < d6 * d6) && (d4 == -1.0D || d5 < d4)) { - if(par1Entity != entityLiving1) - { - d4 = d5; + if (par1Entity != entityLiving1) + { + d4 = d5; entityLiving = entityLiving1; - } + } } } } return entityLiving; } - + @Override public int getTotalArmorValue() //TODO { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java index 3d99ef3d..4a47621c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java @@ -1,64 +1,17 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import java.util.Calendar; -import java.util.UUID; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.ModItems; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; import cpw.mods.fml.common.network.Player; -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; import net.minecraft.block.BlockColored; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EntityLivingData; -import net.minecraft.entity.EntityOwnable; -import net.minecraft.entity.EnumCreatureAttribute; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIBeg; -import net.minecraft.entity.ai.EntityAIBreakDoor; -import net.minecraft.entity.ai.EntityAIFleeSun; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILeapAtTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIMate; -import net.minecraft.entity.ai.EntityAIMoveThroughVillage; -import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAIPanic; -import net.minecraft.entity.ai.EntityAIRestrictSun; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAITargetNonTamed; -import net.minecraft.entity.ai.EntityAITempt; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.ai.attributes.Attribute; -import net.minecraft.entity.ai.attributes.AttributeInstance; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.ai.attributes.RangedAttribute; +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.entity.passive.EntityTameable; -import net.minecraft.entity.passive.EntityVillager; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -67,13 +20,8 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.pathfinding.PathEntity; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.stats.AchievementList; import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraft.world.WorldProviderHell; public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, Player { @@ -125,8 +73,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -152,8 +99,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, if (par1EntityLivingBase == null) { this.setAngry(false); - } - else if (!this.isTamed()) + } else if (!this.isTamed()) { this.setAngry(true); } @@ -171,8 +117,8 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, { super.entityInit(); this.dataWatcher.addObject(18, new Float(this.getHealth())); - this.dataWatcher.addObject(19, new Byte((byte)0)); - this.dataWatcher.addObject(20, new Byte((byte)BlockColored.getBlockFromDye(1))); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); } /** @@ -190,7 +136,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("CollarColor", (byte)this.getCollarColor()); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); } /** @@ -289,8 +235,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, if (this.isEntityInvulnerable()) { return false; - } - else + } else { Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); @@ -307,7 +252,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 4 : 2; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)i); + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); } public void setTamed(boolean par1) @@ -317,8 +262,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, if (par1) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -337,7 +281,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, { if (Item.itemsList[itemstack.itemID] instanceof ItemFood) { - ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID]; + ItemFood itemfood = (ItemFood) Item.itemsList[itemstack.itemID]; if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < this.maxTamedHealth) { @@ -346,11 +290,11 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, --itemstack.stackSize; } - this.heal((float)itemfood.getHealAmount()); + this.heal((float) itemfood.getHealAmount()); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } return true; @@ -364,15 +308,14 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; - this.setPathToEntity((PathEntity)null); - this.setTarget((Entity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); } this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); } - } - else if (itemstack != null && itemstack.itemID == AlchemicalWizardry.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) + } else if (itemstack != null && itemstack.itemID == ModItems.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) { if (!par1EntityPlayer.capabilities.isCreativeMode) { @@ -381,7 +324,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) @@ -389,18 +332,17 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, if (this.rand.nextInt(1) == 0) { this.setTamed(true); - this.setPathToEntity((PathEntity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); this.aiSit.setSitting(true); this.setHealth(this.maxTamedHealth); this.setOwner(par1EntityPlayer.getCommandSenderName()); this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte)7); - } - else + this.worldObj.setEntityState(this, (byte) 7); + } else { this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte)6); + this.worldObj.setEntityState(this, (byte) 6); } } @@ -437,11 +379,10 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, if (par1) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } - else + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); } } @@ -458,7 +399,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, */ public void setCollarColor(int par1) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte)(par1 & 15))); + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); } /** @@ -473,11 +414,10 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, { if (par1) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)1)); - } - else + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)0)); + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); } } @@ -509,7 +449,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, { if (par1EntityLivingBase instanceof EntityFallenAngel) { - EntityFallenAngel entitywolf = (EntityFallenAngel)par1EntityLivingBase; + EntityFallenAngel entitywolf = (EntityFallenAngel) par1EntityLivingBase; if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) { @@ -517,9 +457,8 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, } } - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame(); - } - else + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else { return false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java index 7c2eb1c8..ca24366e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java @@ -4,11 +4,8 @@ import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; public class EntityFireElemental extends EntityElemental implements IMob { @@ -22,8 +19,8 @@ public class EntityFireElemental extends EntityElemental implements IMob { if (target instanceof EntityLivingBase) { - ((EntityLivingBase)target).setFire(10); - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); + ((EntityLivingBase) target).setFire(10); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); } } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java index 2fc1da56..ece389cb 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java @@ -4,13 +4,10 @@ import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; public class EntityHolyElemental extends EntityElemental implements IMob { @@ -23,9 +20,9 @@ public class EntityHolyElemental extends EntityElemental implements IMob { if (target instanceof EntityLivingBase) { - ((EntityLivingBase)target).attackEntityFrom(DamageSource.causeMobDamage(this), 15); - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(Potion.poison.id, 100, 1)); + ((EntityLivingBase) target).attackEntityFrom(DamageSource.causeMobDamage(this), 15); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(Potion.poison.id, 100, 1)); } } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java index cc85fd9b..60ae6874 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java @@ -2,24 +2,12 @@ package WayofTime.alchemicalWizardry.common.entity.mob; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.ModItems; import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; import net.minecraft.block.Block; import net.minecraft.block.BlockColored; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.passive.EntityAnimal; @@ -85,8 +73,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -112,8 +99,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob if (par1EntityLivingBase == null) { this.setAngry(false); - } - else if (!this.isTamed()) + } else if (!this.isTamed()) { this.setAngry(true); } @@ -131,8 +117,8 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { super.entityInit(); this.dataWatcher.addObject(18, new Float(this.getHealth())); - this.dataWatcher.addObject(19, new Byte((byte)0)); - this.dataWatcher.addObject(20, new Byte((byte)BlockColored.getBlockFromDye(1))); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); } /** @@ -150,7 +136,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("CollarColor", (byte)this.getCollarColor()); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); } /** @@ -226,11 +212,11 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { if (worldObj.rand.nextFloat() < 0.25f) { - int blockID = worldObj.getBlockId((int)posX + i, (int)posY + j, (int)posZ + k); + int blockID = worldObj.getBlockId((int) posX + i, (int) posY + j, (int) posZ + k); if (blockID == Block.waterStill.blockID || blockID == Block.waterMoving.blockID) { - worldObj.setBlock((int)posX + i, (int)posY + j, (int)posZ + k, Block.ice.blockID); + worldObj.setBlock((int) posX + i, (int) posY + j, (int) posZ + k, Block.ice.blockID); } } } @@ -268,8 +254,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob if (this.isEntityInvulnerable()) { return false; - } - else + } else { Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); @@ -286,7 +271,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 4 : 2; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)i); + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); } public void setTamed(boolean par1) @@ -296,8 +281,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob if (par1) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -316,7 +300,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { if (Item.itemsList[itemstack.itemID] instanceof ItemFood) { - ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID]; + ItemFood itemfood = (ItemFood) Item.itemsList[itemstack.itemID]; if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < this.maxTamedHealth) { @@ -325,11 +309,11 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob --itemstack.stackSize; } - this.heal((float)itemfood.getHealAmount()); + this.heal((float) itemfood.getHealAmount()); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } return true; @@ -343,15 +327,14 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; - this.setPathToEntity((PathEntity)null); - this.setTarget((Entity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); } this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); } - } - else if (itemstack != null && itemstack.itemID == AlchemicalWizardry.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) + } else if (itemstack != null && itemstack.itemID == ModItems.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) { if (!par1EntityPlayer.capabilities.isCreativeMode) { @@ -360,7 +343,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) @@ -368,18 +351,17 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob if (this.rand.nextInt(1) == 0) { this.setTamed(true); - this.setPathToEntity((PathEntity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); this.aiSit.setSitting(true); this.setHealth(this.maxTamedHealth); this.setOwner(par1EntityPlayer.getCommandSenderName()); this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte)7); - } - else + this.worldObj.setEntityState(this, (byte) 7); + } else { this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte)6); + this.worldObj.setEntityState(this, (byte) 6); } } @@ -416,11 +398,10 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob if (par1) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } - else + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); } } @@ -437,7 +418,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob */ public void setCollarColor(int par1) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte)(par1 & 15))); + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); } /** @@ -452,11 +433,10 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { if (par1) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)1)); - } - else + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)0)); + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); } } @@ -488,7 +468,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { if (par1EntityLivingBase instanceof EntityIceDemon) { - EntityIceDemon entitywolf = (EntityIceDemon)par1EntityLivingBase; + EntityIceDemon entitywolf = (EntityIceDemon) par1EntityLivingBase; if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) { @@ -496,9 +476,8 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob } } - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame(); - } - else + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else { return false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java index f7fe705d..35966a8e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java @@ -2,30 +2,17 @@ package WayofTime.alchemicalWizardry.common.entity.mob; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.ModItems; import net.minecraft.block.BlockColored; -import net.minecraft.client.model.ModelIronGolem; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAITargetNonTamed; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -36,7 +23,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.pathfinding.PathEntity; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.common.network.Player; public class EntityLowerGuardian extends EntityDemon { @@ -84,8 +70,7 @@ public class EntityLowerGuardian extends EntityDemon if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -111,8 +96,7 @@ public class EntityLowerGuardian extends EntityDemon if (par1EntityLivingBase == null) { this.setAngry(false); - } - else if (!this.isTamed()) + } else if (!this.isTamed()) { this.setAngry(true); } @@ -130,8 +114,8 @@ public class EntityLowerGuardian extends EntityDemon { super.entityInit(); this.dataWatcher.addObject(18, new Float(this.getHealth())); - this.dataWatcher.addObject(19, new Byte((byte)0)); - this.dataWatcher.addObject(20, new Byte((byte)BlockColored.getBlockFromDye(1))); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); } /** @@ -149,8 +133,8 @@ public class EntityLowerGuardian extends EntityDemon { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("CollarColor", (byte)this.getCollarColor()); - par1NBTTagCompound.setByte("attackTimer", (byte)attackTimer); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); + par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); par1NBTTagCompound.setBoolean("isAggro", this.isAggro()); } @@ -260,8 +244,7 @@ public class EntityLowerGuardian extends EntityDemon if (this.isEntityInvulnerable()) { return false; - } - else + } else { Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); @@ -278,8 +261,8 @@ public class EntityLowerGuardian extends EntityDemon public boolean attackEntityAsMob(Entity par1Entity) { this.attackTimer = 10; - this.worldObj.setEntityState(this, (byte)4); - boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)(7 + this.rand.nextInt(15))); + this.worldObj.setEntityState(this, (byte) 4); + boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); if (flag) { @@ -297,8 +280,7 @@ public class EntityLowerGuardian extends EntityDemon if (par1) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -317,7 +299,7 @@ public class EntityLowerGuardian extends EntityDemon { if (Item.itemsList[itemstack.itemID] instanceof ItemFood) { - ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID]; + ItemFood itemfood = (ItemFood) Item.itemsList[itemstack.itemID]; if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectInt(18) < this.maxTamedHealth) { @@ -326,11 +308,11 @@ public class EntityLowerGuardian extends EntityDemon --itemstack.stackSize; } - this.heal((float)itemfood.getHealAmount()); + this.heal((float) itemfood.getHealAmount()); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } return true; @@ -344,15 +326,14 @@ public class EntityLowerGuardian extends EntityDemon { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; - this.setPathToEntity((PathEntity)null); - this.setTarget((Entity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); } this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); } - } - else if (itemstack != null && itemstack.itemID == AlchemicalWizardry.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) + } else if (itemstack != null && itemstack.itemID == ModItems.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) { if (!par1EntityPlayer.capabilities.isCreativeMode) { @@ -361,7 +342,7 @@ public class EntityLowerGuardian extends EntityDemon if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) @@ -369,18 +350,17 @@ public class EntityLowerGuardian extends EntityDemon if (this.rand.nextInt(1) == 0) { this.setTamed(true); - this.setPathToEntity((PathEntity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); this.aiSit.setSitting(true); this.setHealth(this.maxTamedHealth); this.setOwner(par1EntityPlayer.getCommandSenderName()); this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte)7); - } - else + this.worldObj.setEntityState(this, (byte) 7); + } else { this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte)6); + this.worldObj.setEntityState(this, (byte) 6); } } @@ -417,11 +397,10 @@ public class EntityLowerGuardian extends EntityDemon if (par1) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } - else + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); } } @@ -438,7 +417,7 @@ public class EntityLowerGuardian extends EntityDemon */ public void setCollarColor(int par1) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte)(par1 & 15))); + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); } /** @@ -453,11 +432,10 @@ public class EntityLowerGuardian extends EntityDemon { if (par1) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)1)); - } - else + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)0)); + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); } } @@ -489,7 +467,7 @@ public class EntityLowerGuardian extends EntityDemon { if (par1EntityLivingBase instanceof EntityLowerGuardian) { - EntityLowerGuardian entitywolf = (EntityLowerGuardian)par1EntityLivingBase; + EntityLowerGuardian entitywolf = (EntityLowerGuardian) par1EntityLivingBase; if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) { @@ -497,9 +475,8 @@ public class EntityLowerGuardian extends EntityDemon } } - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame(); - } - else + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else { return false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java index 5bc2f209..4e94fa08 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java @@ -2,22 +2,14 @@ package WayofTime.alchemicalWizardry.common.entity.mob; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.ModItems; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; import net.minecraft.block.BlockColored; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILeapAtTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.passive.EntityAnimal; @@ -83,8 +75,7 @@ public class EntityShade extends EntityDemon if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -110,8 +101,7 @@ public class EntityShade extends EntityDemon if (par1EntityLivingBase == null) { this.setAngry(false); - } - else if (!this.isTamed()) + } else if (!this.isTamed()) { this.setAngry(true); } @@ -129,8 +119,8 @@ public class EntityShade extends EntityDemon { super.entityInit(); this.dataWatcher.addObject(18, new Float(this.getHealth())); - this.dataWatcher.addObject(19, new Byte((byte)0)); - this.dataWatcher.addObject(20, new Byte((byte)BlockColored.getBlockFromDye(1))); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); } /** @@ -148,7 +138,7 @@ public class EntityShade extends EntityDemon { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("CollarColor", (byte)this.getCollarColor()); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); } /** @@ -247,8 +237,7 @@ public class EntityShade extends EntityDemon if (this.isEntityInvulnerable()) { return false; - } - else + } else { Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); @@ -265,7 +254,7 @@ public class EntityShade extends EntityDemon public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 6 : 7; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)i); + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); } public void setTamed(boolean par1) @@ -275,8 +264,7 @@ public class EntityShade extends EntityDemon if (par1) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -295,7 +283,7 @@ public class EntityShade extends EntityDemon { if (Item.itemsList[itemstack.itemID] instanceof ItemFood) { - ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID]; + ItemFood itemfood = (ItemFood) Item.itemsList[itemstack.itemID]; if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < this.maxTamedHealth) { @@ -304,11 +292,11 @@ public class EntityShade extends EntityDemon --itemstack.stackSize; } - this.heal((float)itemfood.getHealAmount()); + this.heal((float) itemfood.getHealAmount()); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } return true; @@ -316,21 +304,20 @@ public class EntityShade extends EntityDemon } } - if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) + if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) { if (!this.worldObj.isRemote) { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; - this.setPathToEntity((PathEntity)null); - this.setTarget((Entity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); } this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); } - } - else if (itemstack != null && itemstack.itemID == AlchemicalWizardry.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) + } else if (itemstack != null && itemstack.itemID == ModItems.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) { if (!par1EntityPlayer.capabilities.isCreativeMode) { @@ -339,7 +326,7 @@ public class EntityShade extends EntityDemon if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) @@ -347,18 +334,17 @@ public class EntityShade extends EntityDemon if (this.rand.nextInt(1) == 0) { this.setTamed(true); - this.setPathToEntity((PathEntity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); this.aiSit.setSitting(true); this.setHealth(this.maxTamedHealth); this.setOwner(par1EntityPlayer.getCommandSenderName()); this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte)7); - } - else + this.worldObj.setEntityState(this, (byte) 7); + } else { this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte)6); + this.worldObj.setEntityState(this, (byte) 6); } } @@ -395,11 +381,10 @@ public class EntityShade extends EntityDemon if (par1) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } - else + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); } } @@ -416,7 +401,7 @@ public class EntityShade extends EntityDemon */ public void setCollarColor(int par1) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte)(par1 & 15))); + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); } /** @@ -431,11 +416,10 @@ public class EntityShade extends EntityDemon { if (par1) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)1)); - } - else + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)0)); + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); } } @@ -467,7 +451,7 @@ public class EntityShade extends EntityDemon { if (par1EntityLivingBase instanceof EntityBoulderFist) { - EntityBoulderFist entitywolf = (EntityBoulderFist)par1EntityLivingBase; + EntityBoulderFist entitywolf = (EntityBoulderFist) par1EntityLivingBase; if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) { @@ -475,9 +459,8 @@ public class EntityShade extends EntityDemon } } - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame(); - } - else + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else { return false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java index f830c3c5..ce74fedf 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java @@ -19,9 +19,9 @@ public class EntityShadeElemental extends EntityElemental implements IMob { if (target instanceof EntityLivingBase) { - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 1)); - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(Potion.nightVision.id, 100, 0)); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 1)); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(Potion.nightVision.id, 100, 0)); } } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java index 820f5160..9dd6b538 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java @@ -2,28 +2,16 @@ package WayofTime.alchemicalWizardry.common.entity.mob; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.ModItems; import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; +import cpw.mods.fml.common.network.Player; import net.minecraft.block.BlockColored; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -34,7 +22,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.pathfinding.PathEntity; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.common.network.Player; public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackMob, Player { @@ -86,8 +73,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -113,8 +99,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM if (par1EntityLivingBase == null) { this.setAngry(false); - } - else if (!this.isTamed()) + } else if (!this.isTamed()) { this.setAngry(true); } @@ -132,8 +117,8 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM { super.entityInit(); this.dataWatcher.addObject(18, new Float(this.getHealth())); - this.dataWatcher.addObject(19, new Byte((byte)0)); - this.dataWatcher.addObject(20, new Byte((byte)BlockColored.getBlockFromDye(1))); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); } /** @@ -151,7 +136,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("CollarColor", (byte)this.getCollarColor()); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); } /** @@ -249,8 +234,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM if (this.isEntityInvulnerable()) { return false; - } - else + } else { Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); @@ -267,7 +251,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 4 : 2; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)i); + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); } public void setTamed(boolean par1) @@ -277,8 +261,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM if (par1) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -297,7 +280,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM { if (Item.itemsList[itemstack.itemID] instanceof ItemFood) { - ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID]; + ItemFood itemfood = (ItemFood) Item.itemsList[itemstack.itemID]; if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < this.maxTamedHealth) { @@ -306,11 +289,11 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM --itemstack.stackSize; } - this.heal((float)itemfood.getHealAmount()); + this.heal((float) itemfood.getHealAmount()); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } return true; @@ -318,21 +301,20 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM } } - if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) + if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) { if (!this.worldObj.isRemote) { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; - this.setPathToEntity((PathEntity)null); - this.setTarget((Entity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); } this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); } - } - else if (itemstack != null && itemstack.itemID == AlchemicalWizardry.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) + } else if (itemstack != null && itemstack.itemID == ModItems.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) { if (!par1EntityPlayer.capabilities.isCreativeMode) { @@ -341,7 +323,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) @@ -349,18 +331,17 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM if (this.rand.nextInt(1) == 0) { this.setTamed(true); - this.setPathToEntity((PathEntity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); this.aiSit.setSitting(true); this.setHealth(this.maxTamedHealth); this.setOwner(par1EntityPlayer.getCommandSenderName()); this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte)7); - } - else + this.worldObj.setEntityState(this, (byte) 7); + } else { this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte)6); + this.worldObj.setEntityState(this, (byte) 6); } } @@ -397,11 +378,10 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM if (par1) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } - else + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); } } @@ -418,7 +398,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM */ public void setCollarColor(int par1) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte)(par1 & 15))); + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); } /** @@ -433,11 +413,10 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM { if (par1) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)1)); - } - else + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)0)); + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); } } @@ -469,7 +448,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM { if (par1EntityLivingBase instanceof EntitySmallEarthGolem) { - EntitySmallEarthGolem entitywolf = (EntitySmallEarthGolem)par1EntityLivingBase; + EntitySmallEarthGolem entitywolf = (EntitySmallEarthGolem) par1EntityLivingBase; if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) { @@ -477,9 +456,8 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM } } - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame(); - } - else + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else { return false; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java index ddc2e763..232d5728 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java @@ -18,8 +18,8 @@ public class EntityWaterElemental extends EntityElemental implements IMob { if (target instanceof EntityLivingBase) { - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 2)); - ((EntityLivingBase)target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 2)); + ((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0)); } } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java index 18e07a02..0b39a900 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java @@ -2,29 +2,16 @@ package WayofTime.alchemicalWizardry.common.entity.mob; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.ModItems; import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; +import cpw.mods.fml.common.network.Player; import net.minecraft.block.BlockColored; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -35,7 +22,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.pathfinding.PathEntity; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.common.network.Player; public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackMob, Player { @@ -87,8 +73,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -114,8 +99,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM if (par1EntityLivingBase == null) { this.setAngry(false); - } - else if (!this.isTamed()) + } else if (!this.isTamed()) { this.setAngry(true); } @@ -133,8 +117,8 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM { super.entityInit(); this.dataWatcher.addObject(18, new Float(this.getHealth())); - this.dataWatcher.addObject(19, new Byte((byte)0)); - this.dataWatcher.addObject(20, new Byte((byte)BlockColored.getBlockFromDye(1))); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); } /** @@ -152,7 +136,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("CollarColor", (byte)this.getCollarColor()); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); } /** @@ -194,6 +178,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM { return "mob.blaze.death"; } + /** * Returns the volume for the sounds this mob makes. */ @@ -249,8 +234,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM if (this.isEntityInvulnerable()) { return false; - } - else + } else { Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); @@ -267,7 +251,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 4 : 2; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)i); + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); } public void setTamed(boolean par1) @@ -277,8 +261,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM if (par1) { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); - } - else + } else { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); } @@ -297,7 +280,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM { if (Item.itemsList[itemstack.itemID] instanceof ItemFood) { - ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID]; + ItemFood itemfood = (ItemFood) Item.itemsList[itemstack.itemID]; if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < this.maxTamedHealth) { @@ -306,11 +289,11 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM --itemstack.stackSize; } - this.heal((float)itemfood.getHealAmount()); + this.heal((float) itemfood.getHealAmount()); if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } return true; @@ -318,21 +301,20 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM } } - if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) + if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) { if (!this.worldObj.isRemote) { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; - this.setPathToEntity((PathEntity)null); - this.setTarget((Entity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); } this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); } - } - else if (itemstack != null && itemstack.itemID == AlchemicalWizardry.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) + } else if (itemstack != null && itemstack.itemID == ModItems.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) { if (!par1EntityPlayer.capabilities.isCreativeMode) { @@ -341,7 +323,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack)null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); } if (!this.worldObj.isRemote) @@ -349,18 +331,17 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM if (this.rand.nextInt(1) == 0) { this.setTamed(true); - this.setPathToEntity((PathEntity)null); - this.setAttackTarget((EntityLivingBase)null); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); this.aiSit.setSitting(true); this.setHealth(this.maxTamedHealth); this.setOwner(par1EntityPlayer.getCommandSenderName()); this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte)7); - } - else + this.worldObj.setEntityState(this, (byte) 7); + } else { this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte)6); + this.worldObj.setEntityState(this, (byte) 6); } } @@ -397,11 +378,10 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM if (par1) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } - else + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); } } @@ -418,7 +398,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM */ public void setCollarColor(int par1) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte)(par1 & 15))); + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); } /** @@ -433,11 +413,10 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM { if (par1) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)1)); - } - else + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte)0)); + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); } } @@ -469,7 +448,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM { if (par1EntityLivingBase instanceof EntityWingedFireDemon) { - EntityWingedFireDemon entitywolf = (EntityWingedFireDemon)par1EntityLivingBase; + EntityWingedFireDemon entitywolf = (EntityWingedFireDemon) par1EntityLivingBase; if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) { @@ -477,9 +456,8 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM } } - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).canAttackPlayer((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).isTame(); - } - else + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else { return false; } @@ -498,7 +476,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM double xCoord; double yCoord; double zCoord; - this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)this.posX, (int)this.posY, (int)this.posZ, 0); + this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) this.posX, (int) this.posY, (int) this.posZ, 0); FireProjectile hol = new FireProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600); this.worldObj.spawnEntityInWorld(hol); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java index 69697e24..2569513f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import java.util.Iterator; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -11,17 +10,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumMovingObjectType; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; +import net.minecraft.util.*; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.Iterator; +import java.util.List; //Shamelessly ripped off from x3n0ph0b3 public class EnergyBlastProjectile extends Entity implements IProjectile @@ -32,7 +25,9 @@ public class EnergyBlastProjectile extends Entity implements IProjectile protected int inTile = 0; protected int inData = 0; protected boolean inGround = false; - /** The owner of this arrow. */ + /** + * The owner of this arrow. + */ public EntityLivingBase shootingEntity; protected int ticksInAir = 0; protected int maxTicksInAir = 600; @@ -61,14 +56,14 @@ public class EnergyBlastProjectile extends Entity implements IProjectile float par3 = 0.8F; this.setSize(0.5F, 0.5F); this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); yOffset = 0.0F; - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float)Math.PI); + motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); + motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); + motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); this.projectileDamage = damage; this.maxTicksInAir = 600; @@ -81,14 +76,14 @@ public class EnergyBlastProjectile extends Entity implements IProjectile float par3 = 0.8F; this.setSize(0.5F, 0.5F); this.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); yOffset = 0.0F; - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float)Math.PI); + motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); + motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); + motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); this.projectileDamage = damage; this.maxTicksInAir = maxTicksInAir; @@ -99,21 +94,21 @@ public class EnergyBlastProjectile extends Entity implements IProjectile super(par1World); this.renderDistanceWeight = 10.0D; this.shootingEntity = par2EntityLivingBase; - this.posY = par2EntityLivingBase.posY + (double)par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; + this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; - double d1 = par3EntityLivingBase.boundingBox.minY + (double)(par3EntityLivingBase.height / 1.5F) - this.posY; + double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; - double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2); + double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); if (d3 >= 1.0E-7D) { - float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; - float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); + float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI)); double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); this.yOffset = 0.0F; - float f4 = (float)d3 * 0.2F; + float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1, d2, par4, par5); } @@ -124,7 +119,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile @Override protected void entityInit() { - dataWatcher.addObject(16, Byte.valueOf((byte)0)); + dataWatcher.addObject(16, Byte.valueOf((byte) 0)); } /** @@ -148,8 +143,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile motionY = var3; motionZ = var5; float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5); - prevRotationYaw = rotationYaw = (float)(Math.atan2(var1, var5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float)(Math.atan2(var3, var10) * 180.0D / Math.PI); + prevRotationYaw = rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI); + prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } @Override @@ -178,8 +173,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) { float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); - prevRotationYaw = rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float)(Math.atan2(par3, var7) * 180.0D / Math.PI); + prevRotationYaw = rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI); + prevRotationPitch = rotationPitch = (float) (Math.atan2(par3, var7) * 180.0D / Math.PI); prevRotationPitch = rotationPitch; prevRotationYaw = rotationYaw; this.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch); @@ -208,7 +203,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile while (i.hasNext()) { - EntityPlayer e = (EntityPlayer)i.next(); + EntityPlayer e = (EntityPlayer) i.next(); double distance = e.getDistanceToEntity(this); if (distance < closestDistance) @@ -226,8 +221,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) { float var1 = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ); - prevRotationYaw = rotationYaw = (float)(Math.atan2(motionX, motionZ) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float)(Math.atan2(motionY, var1) * 180.0D / Math.PI); + prevRotationYaw = rotationYaw = (float) (Math.atan2(motionX, motionZ) * 180.0D / Math.PI); + prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); } int var16 = worldObj.getBlockId(xTile, yTile, zTile); @@ -253,8 +248,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile // this.groundImpact(); // this.setDead(); } - } - else + } else { ++ticksInAir; @@ -286,7 +280,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile while (var9.hasNext()) { - Entity var10 = (Entity)var9.next(); + Entity var10 = (Entity) var9.next(); if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) { @@ -343,12 +337,12 @@ public class EnergyBlastProjectile extends Entity implements IProjectile @Override public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { - par1NBTTagCompound.setShort("xTile", (short)xTile); - par1NBTTagCompound.setShort("yTile", (short)yTile); - par1NBTTagCompound.setShort("zTile", (short)zTile); - par1NBTTagCompound.setByte("inTile", (byte)inTile); - par1NBTTagCompound.setByte("inData", (byte)inData); - par1NBTTagCompound.setByte("inGround", (byte)(inGround ? 1 : 0)); + par1NBTTagCompound.setShort("xTile", (short) xTile); + par1NBTTagCompound.setShort("yTile", (short) yTile); + par1NBTTagCompound.setShort("zTile", (short) zTile); + par1NBTTagCompound.setByte("inTile", (byte) inTile); + par1NBTTagCompound.setByte("inData", (byte) inData); + par1NBTTagCompound.setByte("inGround", (byte) (inGround ? 1 : 0)); par1NBTTagCompound.setInteger("ticksInAir", ticksInAir); par1NBTTagCompound.setInteger("maxTicksInAir", maxTicksInAir); par1NBTTagCompound.setInteger("projectileDamage", this.projectileDamage); @@ -414,11 +408,10 @@ public class EnergyBlastProjectile extends Entity implements IProjectile if (par1) { - dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 | 1))); - } - else + dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 | 1))); + } else { - dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 & -2))); + dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 & -2))); } } @@ -442,10 +435,9 @@ public class EnergyBlastProjectile extends Entity implements IProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { - worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float)(0.1), true); + worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float) (0.1), true); this.setDead(); } } @@ -456,17 +448,16 @@ public class EnergyBlastProjectile extends Entity implements IProjectile { shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) { - ((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2)); + ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2)); } doDamage(projectileDamage, mop); - worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float)(0.1), true); + worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float) (0.1), true); } spawnHitParticles("magicCrit", 8); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java index 2b6af5ac..0c5d760b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java @@ -1,6 +1,6 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModBlocks; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -35,7 +35,7 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile public EntityBloodLightProjectile(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir) { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); + super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } @Override @@ -55,8 +55,7 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { int sideHit = mop.sideHit; int blockX = mop.blockX; @@ -65,32 +64,32 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile if (sideHit == 0 && this.worldObj.isAirBlock(blockX, blockY - 1, blockZ)) { - this.worldObj.setBlock(blockX, blockY - 1, blockZ, AlchemicalWizardry.blockBloodLight.blockID); + this.worldObj.setBlock(blockX, blockY - 1, blockZ, ModBlocks.blockBloodLight.blockID); } if (sideHit == 1 && this.worldObj.isAirBlock(blockX, blockY + 1, blockZ)) { - this.worldObj.setBlock(blockX, blockY + 1, blockZ, AlchemicalWizardry.blockBloodLight.blockID); + this.worldObj.setBlock(blockX, blockY + 1, blockZ, ModBlocks.blockBloodLight.blockID); } if (sideHit == 2 && this.worldObj.isAirBlock(blockX, blockY, blockZ - 1)) { - this.worldObj.setBlock(blockX, blockY, blockZ - 1 , AlchemicalWizardry.blockBloodLight.blockID); + this.worldObj.setBlock(blockX, blockY, blockZ - 1, ModBlocks.blockBloodLight.blockID); } if (sideHit == 3 && this.worldObj.isAirBlock(blockX, blockY, blockZ + 1)) { - this.worldObj.setBlock(blockX, blockY, blockZ + 1 , AlchemicalWizardry.blockBloodLight.blockID); + this.worldObj.setBlock(blockX, blockY, blockZ + 1, ModBlocks.blockBloodLight.blockID); } if (sideHit == 4 && this.worldObj.isAirBlock(blockX - 1, blockY, blockZ)) { - this.worldObj.setBlock(blockX - 1, blockY, blockZ, AlchemicalWizardry.blockBloodLight.blockID); + this.worldObj.setBlock(blockX - 1, blockY, blockZ, ModBlocks.blockBloodLight.blockID); } if (sideHit == 5 && this.worldObj.isAirBlock(blockX + 1, blockY, blockZ)) { - this.worldObj.setBlock(blockX + 1, blockY, blockZ, AlchemicalWizardry.blockBloodLight.blockID); + this.worldObj.setBlock(blockX + 1, blockY, blockZ, ModBlocks.blockBloodLight.blockID); } //worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true); @@ -106,33 +105,31 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile { shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) { //((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2)); - ((EntityLivingBase)mop).setFire(50); - ((EntityLivingBase)mop).setRevengeTarget(shootingEntity); + ((EntityLivingBase) mop).setFire(50); + ((EntityLivingBase) mop).setRevengeTarget(shootingEntity); - if (((EntityLivingBase)mop).isPotionActive(Potion.fireResistance) || ((EntityLivingBase)mop).isImmuneToFire()) + if (((EntityLivingBase) mop).isPotionActive(Potion.fireResistance) || ((EntityLivingBase) mop).isImmuneToFire()) { - ((EntityLivingBase)mop).attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - } - else + ((EntityLivingBase) mop).attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); + } else { doDamage(projectileDamage, mop); - ((EntityLivingBase)mop).hurtResistantTime = 0; + ((EntityLivingBase) mop).hurtResistantTime = 0; } } //worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true); } - if (worldObj.isAirBlock((int)this.posX, (int)this.posY, (int)this.posZ)) + if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) { - worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ, Block.fire.blockID); + worldObj.setBlock((int) this.posX, (int) this.posY, (int) this.posZ, Block.fire.blockID); } spawnHitParticles("magicCrit", 8); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java index 497583e0..e34185b8 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java @@ -1,14 +1,9 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; -import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -36,7 +31,7 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile public EntityEnergyBazookaMainProjectile(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir) { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); + super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } @Override @@ -56,10 +51,9 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { - worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float)(5.0f), false); + worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float) (5.0f), false); this.spawnSecondaryProjectiles(); } @@ -73,8 +67,7 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile { shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) @@ -82,7 +75,7 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile spawnSecondaryProjectiles(); } - worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float)(5.0f), false); + worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float) (5.0f), false); } spawnHitParticles("magicCrit", 8); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java index d0921281..f4997ab6 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java @@ -1,22 +1,18 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import java.util.Iterator; -import java.util.List; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumMovingObjectType; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; +import net.minecraft.util.*; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.Iterator; +import java.util.List; public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectile implements IProjectile { @@ -26,7 +22,9 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil private int inTile = 0; private int inData = 0; private boolean inGround = false; - /** The owner of this arrow. */ + /** + * The owner of this arrow. + */ public EntityLivingBase shootingEntity; private int ticksInAir = 0; private int ricochetCounter = 0; @@ -56,14 +54,14 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil float par3 = 0.8F; this.setSize(0.1F, 0.1F); this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch); - posX -= MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + posX -= MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; posY -= 0.2D; - posZ -= MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); yOffset = 0.0F; - motionX = -MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI); - motionZ = MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI); - motionY = -MathHelper.sin(rotationPitch / 180.0F * (float)Math.PI); + motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); + motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); + motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); this.setThrowableHeading(motionX, motionY, motionZ, par3 * 1.5F, 1.0F); this.damage = damage; } @@ -71,7 +69,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil @Override protected void entityInit() { - dataWatcher.addObject(16, Byte.valueOf((byte)0)); + dataWatcher.addObject(16, Byte.valueOf((byte) 0)); } /** @@ -95,8 +93,8 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil motionY = var3; motionZ = var5; float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5); - prevRotationYaw = rotationYaw = (float)(Math.atan2(var1, var5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float)(Math.atan2(var3, var10) * 180.0D / Math.PI); + prevRotationYaw = rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI); + prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } @Override @@ -125,8 +123,8 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) { float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); - prevRotationYaw = rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float)(Math.atan2(par3, var7) * 180.0D / Math.PI); + prevRotationYaw = rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI); + prevRotationPitch = rotationPitch = (float) (Math.atan2(par3, var7) * 180.0D / Math.PI); prevRotationPitch = rotationPitch; prevRotationYaw = rotationYaw; this.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch); @@ -153,7 +151,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil while (i.hasNext()) { - EntityPlayer e = (EntityPlayer)i.next(); + EntityPlayer e = (EntityPlayer) i.next(); double distance = e.getDistanceToEntity(this); if (distance < closestDistance) @@ -171,8 +169,8 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F) { float var1 = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ); - prevRotationYaw = rotationYaw = (float)(Math.atan2(motionX, motionZ) * 180.0D / Math.PI); - prevRotationPitch = rotationPitch = (float)(Math.atan2(motionY, var1) * 180.0D / Math.PI); + prevRotationYaw = rotationYaw = (float) (Math.atan2(motionX, motionZ) * 180.0D / Math.PI); + prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); } int var16 = worldObj.getBlockId(xTile, yTile, zTile); @@ -198,8 +196,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil // this.groundImpact(); // this.setDead(); } - } - else + } else { ++ticksInAir; @@ -232,7 +229,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil while (var9.hasNext()) { - Entity var10 = (Entity)var9.next(); + Entity var10 = (Entity) var9.next(); if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) { @@ -290,12 +287,12 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil @Override public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { - par1NBTTagCompound.setShort("xTile", (short)xTile); - par1NBTTagCompound.setShort("yTile", (short)yTile); - par1NBTTagCompound.setShort("zTile", (short)zTile); - par1NBTTagCompound.setByte("inTile", (byte)inTile); - par1NBTTagCompound.setByte("inData", (byte)inData); - par1NBTTagCompound.setByte("inGround", (byte)(inGround ? 1 : 0)); + par1NBTTagCompound.setShort("xTile", (short) xTile); + par1NBTTagCompound.setShort("yTile", (short) yTile); + par1NBTTagCompound.setShort("zTile", (short) zTile); + par1NBTTagCompound.setByte("inTile", (byte) inTile); + par1NBTTagCompound.setByte("inData", (byte) inData); + par1NBTTagCompound.setByte("inGround", (byte) (inGround ? 1 : 0)); } /** @@ -355,11 +352,10 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil if (par1) { - dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 | 1))); - } - else + dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 | 1))); + } else { - dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 & -2))); + dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 & -2))); } } @@ -383,8 +379,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { this.groundImpact(mop.sideHit); worldObj.createExplosion(shootingEntity, posX, posY, posZ, 2, false); @@ -397,8 +392,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil { shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); this.setDead(); - } - else + } else { doDamage(this.damage + d6(), mop); worldObj.createExplosion(shootingEntity, posX, posY, posZ, 2, false); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java index 72887d05..f3dcf8b2 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java @@ -1,15 +1,9 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -import net.minecraft.block.Block; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; -import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -46,8 +40,7 @@ public class EntityMeteor extends EnergyBlastProjectile if (mop.typeOfHit == EnumMovingObjectType.ENTITY && mop.entityHit != null) { this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { MeteorRegistry.createMeteorImpact(worldObj, mop.blockX, mop.blockY, mop.blockZ, this.meteorID); } @@ -62,10 +55,9 @@ public class EntityMeteor extends EnergyBlastProjectile { shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); this.setDead(); - } - else + } else { - MeteorRegistry.createMeteorImpact(worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, meteorID); + MeteorRegistry.createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID); } this.setDead(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java index 8197fb54..16f1f03b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java @@ -2,10 +2,7 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; @@ -53,10 +50,9 @@ public class ExplosionProjectile extends EnergyBlastProjectile return; } - worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(2), causesEnvDamage); + worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float) (2), causesEnvDamage); //this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { // for(int i=-1;i<=1;i++) // { @@ -71,7 +67,7 @@ public class ExplosionProjectile extends EnergyBlastProjectile // } // } // } - worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(2), causesEnvDamage); + worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float) (2), causesEnvDamage); } this.setDead(); @@ -84,8 +80,7 @@ public class ExplosionProjectile extends EnergyBlastProjectile { shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) @@ -93,11 +88,10 @@ public class ExplosionProjectile extends EnergyBlastProjectile //((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2)); //((EntityLivingBase)mop).setFire(50); //((EntityLivingBase)mop).setRevengeTarget(shootingEntity); - if (((EntityLivingBase)mop).isImmuneToFire()) + if (((EntityLivingBase) mop).isImmuneToFire()) { - doDamage((int)(projectileDamage), mop); - } - else + doDamage((int) (projectileDamage), mop); + } else { doDamage(projectileDamage, mop); } @@ -106,7 +100,7 @@ public class ExplosionProjectile extends EnergyBlastProjectile //worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true); } - if (worldObj.isAirBlock((int)this.posX, (int)this.posY, (int)this.posZ)) + if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) { //worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ,Block.fire.blockID); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java index b4eb6c97..07aa9ad2 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java @@ -3,12 +3,9 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; -import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -36,7 +33,7 @@ public class FireProjectile extends EnergyBlastProjectile public FireProjectile(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir) { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); + super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } @Override @@ -56,8 +53,7 @@ public class FireProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { for (int i = -1; i <= 1; i++) { @@ -65,9 +61,9 @@ public class FireProjectile extends EnergyBlastProjectile { for (int k = -1; k <= 1; k++) { - if (worldObj.isAirBlock((int)this.posX + i, (int)this.posY + j, (int)this.posZ + k)) + if (worldObj.isAirBlock((int) this.posX + i, (int) this.posY + j, (int) this.posZ + k)) { - worldObj.setBlock((int)this.posX + i, (int)this.posY + j, (int)this.posZ + k, Block.fire.blockID); + worldObj.setBlock((int) this.posX + i, (int) this.posY + j, (int) this.posZ + k, Block.fire.blockID); } } } @@ -86,33 +82,31 @@ public class FireProjectile extends EnergyBlastProjectile { shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) { //((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2)); - ((EntityLivingBase)mop).setFire(50); - ((EntityLivingBase)mop).setRevengeTarget(shootingEntity); + ((EntityLivingBase) mop).setFire(50); + ((EntityLivingBase) mop).setRevengeTarget(shootingEntity); - if (((EntityLivingBase)mop).isPotionActive(Potion.fireResistance) || ((EntityLivingBase)mop).isImmuneToFire()) + if (((EntityLivingBase) mop).isPotionActive(Potion.fireResistance) || ((EntityLivingBase) mop).isImmuneToFire()) { - ((EntityLivingBase)mop).attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); - } - else + ((EntityLivingBase) mop).attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); + } else { doDamage(projectileDamage, mop); - ((EntityLivingBase)mop).hurtResistantTime = 0; + ((EntityLivingBase) mop).hurtResistantTime = 0; } } //worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true); } - if (worldObj.isAirBlock((int)this.posX, (int)this.posY, (int)this.posZ)) + if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) { - worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ, Block.fire.blockID); + worldObj.setBlock((int) this.posX, (int) this.posY, (int) this.posZ, Block.fire.blockID); } spawnHitParticles("magicCrit", 8); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java index 7f3b15f5..1323874a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java @@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.common.PacketHandler; import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; @@ -34,7 +33,7 @@ public class HolyProjectile extends EnergyBlastProjectile public HolyProjectile(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir) { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); + super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); } @Override @@ -54,8 +53,7 @@ public class HolyProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { // for(int i=-1;i<=1;i++) // { @@ -82,8 +80,7 @@ public class HolyProjectile extends EnergyBlastProjectile { shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) @@ -91,11 +88,10 @@ public class HolyProjectile extends EnergyBlastProjectile //((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2)); //((EntityLivingBase)mop).setFire(50); //((EntityLivingBase)mop).setRevengeTarget(shootingEntity); - if (((EntityLivingBase)mop).isEntityUndead()) + if (((EntityLivingBase) mop).isEntityUndead()) { - doDamage((int)(projectileDamage * 2), mop); - } - else + doDamage((int) (projectileDamage * 2), mop); + } else { doDamage(projectileDamage, mop); } @@ -104,7 +100,7 @@ public class HolyProjectile extends EnergyBlastProjectile //worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true); } - if (worldObj.isAirBlock((int)this.posX, (int)this.posY, (int)this.posZ)) + if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) { //worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ,Block.fire.blockID); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java index 0c0fec2e..2ad43b42 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java @@ -3,10 +3,8 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import WayofTime.alchemicalWizardry.common.PacketHandler; import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; import cpw.mods.fml.common.network.PacketDispatcher; -import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; @@ -35,6 +33,7 @@ public class IceProjectile extends EnergyBlastProjectile { super(par1World, par2EntityPlayer, damage, maxTicksInAir, posX, posY, posZ, rotationYaw, rotationPitch); } + public IceProjectile(World worldObj, EntityIceDemon entityIceDemon, EntityLivingBase par1EntityLivingBase, float f, float g, int i, int j) { super(worldObj, entityIceDemon, par1EntityLivingBase, f, g, i, j); @@ -57,8 +56,7 @@ public class IceProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { // for(int i=-1;i<=1;i++) // { @@ -86,8 +84,7 @@ public class IceProjectile extends EnergyBlastProjectile { shootingEntity.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) @@ -95,12 +92,11 @@ public class IceProjectile extends EnergyBlastProjectile //((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2)); //((EntityLivingBase)mop).setFire(50); //((EntityLivingBase)mop).setRevengeTarget(shootingEntity); - if (((EntityLivingBase)mop).isImmuneToFire()) + if (((EntityLivingBase) mop).isImmuneToFire()) { - doDamage((int)(projectileDamage * 2), mop); + doDamage((int) (projectileDamage * 2), mop); ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2)); - } - else + } else { doDamage(projectileDamage, mop); ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1)); @@ -110,7 +106,7 @@ public class IceProjectile extends EnergyBlastProjectile //worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true); } - if (worldObj.isAirBlock((int)this.posX, (int)this.posY, (int)this.posZ)) + if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) { //worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ,Block.fire.blockID); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java index 0b513533..8fa42ec5 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java @@ -1,17 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import WayofTime.alchemicalWizardry.common.PacketHandler; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; public class LightningBoltProjectile extends EnergyBlastProjectile { @@ -56,8 +54,7 @@ public class LightningBoltProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { if (causeLightning) { @@ -75,8 +72,7 @@ public class LightningBoltProjectile extends EnergyBlastProjectile { //shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) @@ -93,9 +89,8 @@ public class LightningBoltProjectile extends EnergyBlastProjectile // } if (causeLightning) { - this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, ((EntityLivingBase)mop).posX, ((EntityLivingBase)mop).posY, ((EntityLivingBase)mop).posZ)); - } - else + this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, ((EntityLivingBase) mop).posX, ((EntityLivingBase) mop).posY, ((EntityLivingBase) mop).posZ)); + } else { doDamage(projectileDamage, mop); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java index 906b76f6..0ff5e5db 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import WayofTime.alchemicalWizardry.common.PacketHandler; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; @@ -11,7 +11,6 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; public class MudProjectile extends EnergyBlastProjectile { @@ -41,7 +40,7 @@ public class MudProjectile extends EnergyBlastProjectile public MudProjectile(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5, int damage, int maxTicksInAir, boolean flag) { - super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); + super(par1World, par2EntityLivingBase, par3EntityLivingBase, par4, par5, damage, maxTicksInAir); doesBlindness = flag; } @@ -62,8 +61,7 @@ public class MudProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { } @@ -77,8 +75,7 @@ public class MudProjectile extends EnergyBlastProjectile { //shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) @@ -95,11 +92,10 @@ public class MudProjectile extends EnergyBlastProjectile // } if (doesBlindness) { - ((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 0)); - } - else + ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 0)); + } else { - ((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 2)); + ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 2)); } doDamage(projectileDamage, mop); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java index 67ed98a8..d06a38fa 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java @@ -2,21 +2,17 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import WayofTime.alchemicalWizardry.common.PacketHandler; import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; public class TeleportProjectile extends EnergyBlastProjectile { @@ -73,14 +69,13 @@ public class TeleportProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { if (isEntityTeleport) { if (shootingEntity != null && shootingEntity instanceof EntityPlayerMP) { - EntityPlayerMP entityplayermp = (EntityPlayerMP)shootingEntity; + EntityPlayerMP entityplayermp = (EntityPlayerMP) shootingEntity; if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == this.worldObj) { @@ -90,7 +85,7 @@ public class TeleportProjectile extends EnergyBlastProjectile { if (shootingEntity.isRiding()) { - shootingEntity.mountEntity((Entity)null); + shootingEntity.mountEntity((Entity) null); } shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); @@ -112,8 +107,7 @@ public class TeleportProjectile extends EnergyBlastProjectile { //shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) @@ -132,7 +126,7 @@ public class TeleportProjectile extends EnergyBlastProjectile { if (shootingEntity != null && shootingEntity instanceof EntityPlayerMP) { - EntityPlayerMP entityplayermp = (EntityPlayerMP)shootingEntity; + EntityPlayerMP entityplayermp = (EntityPlayerMP) shootingEntity; if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == this.worldObj) { @@ -142,7 +136,7 @@ public class TeleportProjectile extends EnergyBlastProjectile { if (shootingEntity.isRiding()) { - shootingEntity.mountEntity((Entity)null); + shootingEntity.mountEntity((Entity) null); } shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); @@ -151,8 +145,7 @@ public class TeleportProjectile extends EnergyBlastProjectile } } } - } - else + } else { // int x = (int)this.posX + mop.worldObj.rand.nextInt(100) - mop.worldObj.rand.nextInt(100); // int y = (int)this.posY + mop.worldObj.rand.nextInt(10) - mop.worldObj.rand.nextInt(10); @@ -175,7 +168,7 @@ public class TeleportProjectile extends EnergyBlastProjectile // i++; // } // } - SpellTeleport.teleportRandomly((EntityLivingBase)mop, 64); + SpellTeleport.teleportRandomly((EntityLivingBase) mop, 64); } //doDamage(projectileDamage, mop); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java index 6c0e87b7..8bbcc689 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java @@ -2,16 +2,14 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.PacketHandler; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; public class WaterProjectile extends EnergyBlastProjectile { @@ -52,8 +50,7 @@ public class WaterProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { } @@ -67,8 +64,7 @@ public class WaterProjectile extends EnergyBlastProjectile { //shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) @@ -83,15 +79,14 @@ public class WaterProjectile extends EnergyBlastProjectile // { // doDamage(projectileDamage, mop); // } - if (((EntityLivingBase)mop).isImmuneToFire()) + if (((EntityLivingBase) mop).isImmuneToFire()) { doDamage(projectileDamage * 2, mop); - ((EntityLivingBase)mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 1)); - } - else + ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 1)); + } else { doDamage(projectileDamage, mop); - ((EntityLivingBase)mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 0)); + ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 0)); } //((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java index f343abc2..1b5354a7 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java @@ -1,14 +1,13 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import WayofTime.alchemicalWizardry.common.PacketHandler; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; public class WindGustProjectile extends EnergyBlastProjectile { @@ -49,8 +48,7 @@ public class WindGustProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } - else if (mop.typeOfHit == EnumMovingObjectType.TILE) + } else if (mop.typeOfHit == EnumMovingObjectType.TILE) { // for(int i=-1;i<=1;i++) // { @@ -77,8 +75,7 @@ public class WindGustProjectile extends EnergyBlastProjectile { //shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1); this.setDead(); - } - else + } else { //doDamage(8 + d6(), mop); if (mop instanceof EntityLivingBase) @@ -93,9 +90,9 @@ public class WindGustProjectile extends EnergyBlastProjectile // { // doDamage(projectileDamage, mop); // } - ((EntityLivingBase)mop).motionX = this.motionX * 2; - ((EntityLivingBase)mop).motionY = 1.5; - ((EntityLivingBase)mop).motionZ = this.motionZ * 2; + ((EntityLivingBase) mop).motionX = this.motionX * 2; + ((EntityLivingBase) mop).motionY = 1.5; + ((EntityLivingBase) mop).motionZ = this.motionZ * 2; //((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java b/BM_src/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java index c737a449..1e04a863 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModItems; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; + +import java.util.List; public class AWBaseItems extends Item { @@ -19,19 +20,16 @@ public class AWBaseItems extends Item public void registerIcons(IconRegister iconRegister) { - if (this.itemID == AlchemicalWizardry.blankSlate.itemID) + if (this.itemID == ModItems.blankSlate.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankSlate"); - } - else if (this.itemID == AlchemicalWizardry.reinforcedSlate.itemID) + } else if (this.itemID == ModItems.reinforcedSlate.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ReinforcedSlate"); - } - else if (this.itemID == AlchemicalWizardry.imbuedSlate.itemID) + } else if (this.itemID == ModItems.imbuedSlate.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:InfusedSlate"); - } - else if (this.itemID == AlchemicalWizardry.demonicSlate.itemID) + } else if (this.itemID == ModItems.demonicSlate.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonSlate"); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java b/BM_src/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java index 228b82e7..203157d3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java @@ -1,7 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -10,17 +12,13 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; - import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; public class ActivationCrystal extends EnergyItems { - private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[] { "Weak", "Awakened"}; + private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"Weak", "Awakened"}; @SideOnly(Side.CLIENT) private Icon[] icons; @@ -69,7 +67,7 @@ public class ActivationCrystal extends EnergyItems { par3List.add(EnumChatFormatting.BLUE + "Recipe:"); - for (ItemStack item: recipe) + for (ItemStack item : recipe) { if (item != null) { @@ -77,8 +75,7 @@ public class ActivationCrystal extends EnergyItems } } } - } - else + } else { par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-"); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/AirInk.java b/BM_src/WayofTime/alchemicalWizardry/common/items/AirInk.java index 7bb0768a..352447e2 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/AirInk.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/AirInk.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.item.Item; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.item.Item; public class AirInk extends Item { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java b/BM_src/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java index 0bcfdcca..27063c99 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class ArchmageBloodOrb extends EnergyBattery { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java b/BM_src/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java index fb8005e4..415a41dd 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java @@ -1,7 +1,8 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +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.player.EntityPlayer; @@ -10,9 +11,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; import net.minecraft.util.Icon; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class ArmourInhibitor extends EnergyItems { @@ -40,8 +40,7 @@ public class ArmourInhibitor extends EnergyItems if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -72,8 +71,7 @@ public class ArmourInhibitor extends EnergyItems if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -86,8 +84,7 @@ public class ArmourInhibitor extends EnergyItems if (par1 == 1) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -131,14 +128,13 @@ public class ArmourInhibitor extends EnergyItems 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()); } @@ -154,7 +150,7 @@ public class ArmourInhibitor extends EnergyItems return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/BlankSpell.java b/BM_src/WayofTime/alchemicalWizardry/common/items/BlankSpell.java index 29513b67..cb5930aa 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/BlankSpell.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/BlankSpell.java @@ -1,7 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -9,10 +11,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class BlankSpell extends EnergyItems { @@ -71,28 +71,24 @@ public class BlankSpell extends EnergyItems if (tileEntity instanceof TEHomHeart) { - TEHomHeart homHeart = (TEHomHeart)tileEntity; + TEHomHeart homHeart = (TEHomHeart) tileEntity; if (homHeart.canCastSpell(par1ItemStack, par2World, par3EntityPlayer)) { EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, homHeart.castSpell(par1ItemStack, par2World, par3EntityPlayer)); - } - else + } else { return par1ItemStack; } - } - else + } else { return par1ItemStack; } - } - else + } else { return par1ItemStack; } - } - else + } else { return par1ItemStack; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/BloodShard.java b/BM_src/WayofTime/alchemicalWizardry/common/items/BloodShard.java index fdd0b2c8..511536cc 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/BloodShard.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/BloodShard.java @@ -1,14 +1,15 @@ package WayofTime.alchemicalWizardry.common.items; +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ArmourUpgrade; +import WayofTime.alchemicalWizardry.common.ModItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; 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.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.ArmourUpgrade; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class BloodShard extends Item implements ArmourUpgrade { @@ -24,13 +25,13 @@ public class BloodShard extends Item implements ArmourUpgrade @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister) { - if (this.itemID == AlchemicalWizardry.weakBloodShard.itemID) + if (this.itemID == ModItems.weakBloodShard.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakBloodShard"); return; } - if (this.itemID == AlchemicalWizardry.demonBloodShard.itemID) + if (this.itemID == ModItems.demonBloodShard.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonBloodShard"); return; @@ -39,11 +40,10 @@ public class BloodShard extends Item implements ArmourUpgrade public int getBloodShardLevel() { - if (this.itemID == AlchemicalWizardry.weakBloodShard.itemID) + if (this.itemID == ModItems.weakBloodShard.itemID) { return 1; - } - else if (this.itemID == AlchemicalWizardry.demonBloodShard.itemID) + } else if (this.itemID == ModItems.demonBloodShard.itemID) { return 2; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/BloodboundSword.java b/BM_src/WayofTime/alchemicalWizardry/common/items/BloodboundSword.java index 7467854a..40dd755a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/BloodboundSword.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/BloodboundSword.java @@ -1,7 +1,8 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -9,9 +10,8 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class BloodboundSword extends EnergyItems { @@ -40,9 +40,9 @@ public class BloodboundSword extends EnergyItems { if (par3EntityLivingBase instanceof EntityPlayer) { - EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer)par3EntityLivingBase); + EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase); - if (!this.syphonBatteries(par1ItemStack, (EntityPlayer)par3EntityLivingBase, this.getEnergyUsed())) + if (!this.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) { //this.damagePlayer(null, (EntityPlayer)par3EntityLivingBase, (this.getEnergyUsed() + 99) / 100); } @@ -81,8 +81,7 @@ public class BloodboundSword extends EnergyItems if (par2Block.blockID == Block.web.blockID) { return 15.0F; - } - else + } else { Material material = par2Block.blockMaterial; return material != Material.plants && material != Material.vine && material != Material.coral && material != Material.leaves && material != Material.pumpkin ? 1.0F : 1.5F; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/BoundArmour.java b/BM_src/WayofTime/alchemicalWizardry/common/items/BoundArmour.java index 003d9835..04291acc 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/BoundArmour.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/BoundArmour.java @@ -1,7 +1,11 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ArmourUpgrade; +import WayofTime.alchemicalWizardry.common.IBindable; +import WayofTime.alchemicalWizardry.common.ModItems; +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.EntityLivingBase; @@ -18,11 +22,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; import thaumcraft.api.IGoggles; import thaumcraft.api.nodes.IRevealer; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.IBindable; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, IGoggles, IBindable { @@ -54,22 +55,22 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, public Icon getIconFromDamage(int par1) { - if (this.itemID == AlchemicalWizardry.boundHelmet.itemID) + if (this.itemID == ModItems.boundHelmet.itemID) { return this.helmetIcon; } - if (this.itemID == AlchemicalWizardry.boundPlate.itemID) + if (this.itemID == ModItems.boundPlate.itemID) { return this.plateIcon; } - if (this.itemID == AlchemicalWizardry.boundLeggings.itemID) + if (this.itemID == ModItems.boundLeggings.itemID) { return this.leggingsIcon; } - if (this.itemID == AlchemicalWizardry.boundBoots.itemID) + if (this.itemID == ModItems.boundBoots.itemID) { return this.bootsIcon; } @@ -82,6 +83,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, { return false; } + @Override public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { @@ -95,8 +97,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, if (isImmuneToVoid(armor)) { return new ArmorProperties(-1, 3, 100000); - } - else + } else { return new ArmorProperties(-1, 0, 0); } @@ -112,7 +113,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, return new ArmorProperties(-1, 0, 0); } - if (helmet.itemID == AlchemicalWizardry.boundHelmet.itemID || plate.itemID == AlchemicalWizardry.boundPlate.itemID || leggings.itemID == AlchemicalWizardry.boundLeggings.itemID || boots.itemID == AlchemicalWizardry.boundBoots.itemID) + if (helmet.itemID == ModItems.boundHelmet.itemID || plate.itemID == ModItems.boundPlate.itemID || leggings.itemID == ModItems.boundLeggings.itemID || boots.itemID == ModItems.boundBoots.itemID) { if (source.isUnblockable()) { @@ -128,22 +129,22 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, @Override public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - if (armor.itemID == AlchemicalWizardry.boundHelmet.itemID) + if (armor.itemID == ModItems.boundHelmet.itemID) { return 3; } - if (armor.itemID == AlchemicalWizardry.boundPlate.itemID) + if (armor.itemID == ModItems.boundPlate.itemID) { return 8; } - if (armor.itemID == AlchemicalWizardry.boundLeggings.itemID) + if (armor.itemID == ModItems.boundLeggings.itemID) { return 6; } - if (armor.itemID == AlchemicalWizardry.boundBoots.itemID) + if (armor.itemID == ModItems.boundBoots.itemID) { return 3; } @@ -156,9 +157,9 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, { if (entity instanceof EntityPlayer) { - EnergyItems.checkAndSetItemOwner(stack, (EntityPlayer)entity); + EnergyItems.checkAndSetItemOwner(stack, (EntityPlayer) entity); - if (((EntityPlayer)entity).capabilities.isCreativeMode) + if (((EntityPlayer) entity).capabilities.isCreativeMode) { return; } @@ -204,30 +205,29 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, //TODO Make the armour invisible when the player has Invisibility on. if (entity instanceof EntityLivingBase) { - if (((EntityLivingBase)entity).isPotionActive(Potion.invisibility.id)) + if (((EntityLivingBase) entity).isPotionActive(Potion.invisibility.id)) { - if (itemID == AlchemicalWizardry.boundHelmet.itemID || itemID == AlchemicalWizardry.boundPlate.itemID || itemID == AlchemicalWizardry.boundBoots.itemID) + if (itemID == ModItems.boundHelmet.itemID || itemID == ModItems.boundPlate.itemID || itemID == ModItems.boundBoots.itemID) { return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_1.png"; } - if (itemID == AlchemicalWizardry.boundLeggings.itemID) + if (itemID == ModItems.boundLeggings.itemID) { return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_2.png"; } } } - if (itemID == AlchemicalWizardry.boundHelmet.itemID || itemID == AlchemicalWizardry.boundPlate.itemID || itemID == AlchemicalWizardry.boundBoots.itemID) + if (itemID == ModItems.boundHelmet.itemID || itemID == ModItems.boundPlate.itemID || itemID == ModItems.boundBoots.itemID) { return "alchemicalwizardry:models/armor/boundArmour_layer_1.png"; } - if (itemID == AlchemicalWizardry.boundLeggings.itemID) + if (itemID == ModItems.boundLeggings.itemID) { return "alchemicalwizardry:models/armor/boundArmour_layer_2.png"; - } - else + } else { return null; } @@ -314,9 +314,9 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, if (inv[i].getItem() instanceof ArmourUpgrade && blood > 0) { - if (((ArmourUpgrade)inv[i].getItem()).isUpgrade()) + if (((ArmourUpgrade) inv[i].getItem()).isUpgrade()) { - ((ArmourUpgrade)inv[i].getItem()).onArmourUpdate(par2World, par3Entity, inv[i]); + ((ArmourUpgrade) inv[i].getItem()).onArmourUpdate(par2World, par3Entity, inv[i]); blood--; } @@ -324,7 +324,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, { if (getUpgradeCostMultiplier(par1ItemStack) > 0.02f) { - EnergyItems.syphonBatteries(par1ItemStack, par3Entity, (int)(((ArmourUpgrade)inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack))); + EnergyItems.syphonBatteries(par1ItemStack, par3Entity, (int) (((ArmourUpgrade) inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack))); } } } @@ -348,12 +348,12 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, if (itemStack != null) { - if (itemStack.itemID == AlchemicalWizardry.weakBloodShard.itemID) + if (itemStack.itemID == ModItems.weakBloodShard.itemID) { max = Math.max(max, 1); } - if (itemStack.itemID == AlchemicalWizardry.demonBloodShard.itemID) + if (itemStack.itemID == ModItems.demonBloodShard.itemID) { max = Math.max(max, 2); } @@ -481,7 +481,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, continue; } - if (item.itemID == AlchemicalWizardry.voidSigil.itemID) + if (item.itemID == ModItems.voidSigil.itemID) { return true; } @@ -556,27 +556,27 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, continue; } - if (item.itemID == AlchemicalWizardry.weakBloodOrb.itemID) + if (item.itemID == ModItems.weakBloodOrb.itemID) { return 0.75f; } - if (item.itemID == AlchemicalWizardry.apprenticeBloodOrb.itemID) + if (item.itemID == ModItems.apprenticeBloodOrb.itemID) { return 0.50f; } - if (item.itemID == AlchemicalWizardry.magicianBloodOrb.itemID) + if (item.itemID == ModItems.magicianBloodOrb.itemID) { return 0.25f; } - if (item.itemID == AlchemicalWizardry.masterBloodOrb.itemID) + if (item.itemID == ModItems.masterBloodOrb.itemID) { return 0.0f; } - if (item.itemID == AlchemicalWizardry.archmageBloodOrb.itemID) + if (item.itemID == ModItems.archmageBloodOrb.itemID) { return 0.0f; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/BoundAxe.java b/BM_src/WayofTime/alchemicalWizardry/common/items/BoundAxe.java index 707d47e4..40ca063f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/BoundAxe.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/BoundAxe.java @@ -1,8 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.ArrayList; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.IBindable; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockLeavesBase; import net.minecraft.client.renderer.texture.IconRegister; @@ -18,19 +19,22 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.util.Icon; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.IBindable; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.ArrayList; +import java.util.List; public class BoundAxe extends ItemAxe implements IBindable { - /** Array of blocks the tool has extra effect against. */ - public static final Block[] blocksEffectiveAgainst = new Block[] {Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.pumpkin, Block.pumpkinLantern}; + /** + * Array of blocks the tool has extra effect against. + */ + public static final Block[] blocksEffectiveAgainst = new Block[]{Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.pumpkin, Block.pumpkinLantern}; public float efficiencyOnProperMaterial = 12.0F; - /** Damage versus entities. */ + /** + * Damage versus entities. + */ public float damageVsEntity; private static Icon activeIcon; @@ -69,8 +73,7 @@ public class BoundAxe extends ItemAxe implements IBindable if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -104,8 +107,7 @@ public class BoundAxe extends ItemAxe implements IBindable if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -119,7 +121,7 @@ public class BoundAxe extends ItemAxe implements IBindable if (par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200); + par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); return par1ItemStack; } @@ -133,9 +135,9 @@ public class BoundAxe extends ItemAxe implements IBindable return par1ItemStack; } - int posX = (int)par3EntityPlayer.posX; - int posY = (int)par3EntityPlayer.posY; - int posZ = (int)par3EntityPlayer.posZ; + int posX = (int) par3EntityPlayer.posX; + int posY = (int) par3EntityPlayer.posY; + int posZ = (int) par3EntityPlayer.posZ; boolean silkTouch = false; int so = Enchantment.silkTouch.effectId; int fortune = Enchantment.fortune.effectId; @@ -146,9 +148,9 @@ public class BoundAxe extends ItemAxe implements IBindable { for (int i = 0; i < enchants.tagCount(); i++) { - if (enchants.tagAt(i)instanceof NBTTagCompound) + if (enchants.tagAt(i) instanceof NBTTagCompound) { - NBTTagCompound nbt = (NBTTagCompound)enchants.tagAt(i); + NBTTagCompound nbt = (NBTTagCompound) enchants.tagAt(i); int id = nbt.getShort("id"); if (id == so) @@ -188,8 +190,7 @@ public class BoundAxe extends ItemAxe implements IBindable { par2World.spawnEntityInWorld(new EntityItem(par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ, droppedItem)); } - } - else + } else { ArrayList itemDropList = block.getBlockDropped(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); @@ -224,7 +225,7 @@ public class BoundAxe extends ItemAxe implements IBindable return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -303,7 +304,7 @@ public class BoundAxe extends ItemAxe implements IBindable public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) { - if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D) + if ((double) Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D) { //par1ItemStack.damageItem(1, par7EntityLivingBase); } @@ -338,7 +339,9 @@ public class BoundAxe extends ItemAxe implements IBindable // return true; // } - /** FORGE: Overridden to allow custom tool effectiveness */ + /** + * FORGE: Overridden to allow custom tool effectiveness + */ @Override public float getStrVsBlock(ItemStack stack, Block block, int meta) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java b/BM_src/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java index 720d4160..0a9c6d6f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java @@ -1,8 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.ArrayList; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.IBindable; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -18,19 +19,22 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.util.Icon; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.IBindable; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.ArrayList; +import java.util.List; public class BoundPickaxe extends ItemPickaxe implements IBindable { - /** Array of blocks the tool has extra effect against. */ - public static final Block[] blocksEffectiveAgainst = new Block[] {Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockIron, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered, Block.railActivator}; + /** + * Array of blocks the tool has extra effect against. + */ + public static final Block[] blocksEffectiveAgainst = new Block[]{Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockIron, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered, Block.railActivator}; public float efficiencyOnProperMaterial = 12.0F; - /** Damage versus entities. */ + /** + * Damage versus entities. + */ public float damageVsEntity; private static Icon activeIcon; @@ -70,8 +74,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -105,8 +108,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -120,7 +122,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable if (par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200); + par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); return par1ItemStack; } @@ -134,9 +136,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable return par1ItemStack; } - int posX = (int)par3EntityPlayer.posX; - int posY = (int)par3EntityPlayer.posY; - int posZ = (int)par3EntityPlayer.posZ; + int posX = (int) par3EntityPlayer.posX; + int posY = (int) par3EntityPlayer.posY; + int posZ = (int) par3EntityPlayer.posZ; boolean silkTouch = false; int so = Enchantment.silkTouch.effectId; int fortune = Enchantment.fortune.effectId; @@ -147,9 +149,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable { for (int i = 0; i < enchants.tagCount(); i++) { - if (enchants.tagAt(i)instanceof NBTTagCompound) + if (enchants.tagAt(i) instanceof NBTTagCompound) { - NBTTagCompound nbt = (NBTTagCompound)enchants.tagAt(i); + NBTTagCompound nbt = (NBTTagCompound) enchants.tagAt(i); int id = nbt.getShort("id"); if (id == so) @@ -189,8 +191,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable { par2World.spawnEntityInWorld(new EntityItem(par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ, droppedItem)); } - } - else + } else { ArrayList itemDropList = block.getBlockDropped(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); @@ -225,7 +226,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -305,14 +306,14 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable @Override public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) { - if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D) + if ((double) Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D) { //par1ItemStack.damageItem(1, par7EntityLivingBase); } if (par7EntityLivingBase instanceof EntityPlayer) { - EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par7EntityLivingBase, getEnergyUsed()); + EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par7EntityLivingBase, getEnergyUsed()); } //TODO Possibly add better functionality for the items? @@ -347,7 +348,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable // return false; // } - /** FORGE: Overridden to allow custom tool effectiveness */ + /** + * FORGE: Overridden to allow custom tool effectiveness + */ @Override public float getStrVsBlock(ItemStack stack, Block block, int meta) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/BoundShovel.java b/BM_src/WayofTime/alchemicalWizardry/common/items/BoundShovel.java index 436e552e..e57b1112 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/BoundShovel.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/BoundShovel.java @@ -1,8 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.ArrayList; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.IBindable; +import com.google.common.collect.Multimap; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.enchantment.Enchantment; @@ -19,22 +21,22 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.util.Icon; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.IBindable; -import com.google.common.collect.Multimap; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.List; public class BoundShovel extends ItemSpade implements IBindable { - /** Array of blocks the tool has extra effect against. */ - public static final Block[] blocksEffectiveAgainst = new Block[] {Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium}; + /** + * Array of blocks the tool has extra effect against. + */ + public static final Block[] blocksEffectiveAgainst = new Block[]{Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium}; public float efficiencyOnProperMaterial = 12.0F; - /** Damage versus entities. */ + /** + * Damage versus entities. + */ public float damageVsEntity; private static Icon activeIcon; @@ -73,8 +75,7 @@ public class BoundShovel extends ItemSpade implements IBindable if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -108,8 +109,7 @@ public class BoundShovel extends ItemSpade implements IBindable if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -123,7 +123,7 @@ public class BoundShovel extends ItemSpade implements IBindable if (par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200); + par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); return par1ItemStack; } @@ -137,9 +137,9 @@ public class BoundShovel extends ItemSpade implements IBindable return par1ItemStack; } - int posX = (int)par3EntityPlayer.posX; - int posY = (int)par3EntityPlayer.posY; - int posZ = (int)par3EntityPlayer.posZ; + int posX = (int) par3EntityPlayer.posX; + int posY = (int) par3EntityPlayer.posY; + int posZ = (int) par3EntityPlayer.posZ; boolean silkTouch = false; int so = Enchantment.silkTouch.effectId; int fortune = Enchantment.fortune.effectId; @@ -150,9 +150,9 @@ public class BoundShovel extends ItemSpade implements IBindable { for (int i = 0; i < enchants.tagCount(); i++) { - if (enchants.tagAt(i)instanceof NBTTagCompound) + if (enchants.tagAt(i) instanceof NBTTagCompound) { - NBTTagCompound nbt = (NBTTagCompound)enchants.tagAt(i); + NBTTagCompound nbt = (NBTTagCompound) enchants.tagAt(i); int id = nbt.getShort("id"); if (id == so) @@ -192,8 +192,7 @@ public class BoundShovel extends ItemSpade implements IBindable { par2World.spawnEntityInWorld(new EntityItem(par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ, droppedItem)); } - } - else + } else { ArrayList itemDropList = block.getBlockDropped(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); @@ -228,7 +227,7 @@ public class BoundShovel extends ItemSpade implements IBindable return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -307,7 +306,7 @@ public class BoundShovel extends ItemSpade implements IBindable public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) { - if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D) + if ((double) Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D) { //par1ItemStack.damageItem(1, par7EntityLivingBase); } @@ -340,16 +339,17 @@ public class BoundShovel extends ItemSpade implements IBindable // { // return false; // } - @Override public Multimap getItemAttributeModifiers() { Multimap multimap = super.getItemAttributeModifiers(); - multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", (double)this.damageVsEntity, 0)); + multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", (double) this.damageVsEntity, 0)); return multimap; } - /** FORGE: Overridden to allow custom tool effectiveness */ + /** + * FORGE: Overridden to allow custom tool effectiveness + */ @Override public float getStrVsBlock(ItemStack stack, Block block, int meta) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/CheatyItem.java b/BM_src/WayofTime/alchemicalWizardry/common/items/CheatyItem.java index 7f1afdab..1cf49a07 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/CheatyItem.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/CheatyItem.java @@ -1,7 +1,13 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.IBindable; +import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -11,14 +17,8 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.FakePlayer; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.IBindable; -import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class CheatyItem extends Item implements IBindable { @@ -65,6 +65,7 @@ public class CheatyItem extends Item implements IBindable //par3List.add("LP: " + par2EntityPlayer.getEntityData().getInteger("currentEssence")); } + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); @@ -80,8 +81,8 @@ public class CheatyItem extends Item implements IBindable double posX = par3EntityPlayer.posX; double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; - world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4)); + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4)); } if (!par3EntityPlayer.worldObj.isRemote) @@ -99,8 +100,7 @@ public class CheatyItem extends Item implements IBindable if (par3EntityPlayer.isSneaking()) { PacketDispatcher.sendPacketToServer(PacketHandler.getCreativeCheatPacket(itemTag.getString("ownerName"), false)); - } - else + } else { PacketDispatcher.sendPacketToServer(PacketHandler.getCreativeCheatPacket(itemTag.getString("ownerName"), true)); } @@ -139,8 +139,8 @@ public class CheatyItem extends Item implements IBindable double posX = player.posX; double posY = player.posY; double posZ = player.posZ; - world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - float f = (float)1.0F; + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + float f = (float) 1.0F; float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; @@ -234,7 +234,7 @@ public class CheatyItem extends Item implements IBindable String owner = itemTag.getString("ownerName"); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java b/BM_src/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java index 49f14edd..c5b644db 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java @@ -1,7 +1,11 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import com.google.common.collect.Multimap; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -21,18 +25,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import com.google.common.collect.Multimap; - -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; public class DaggerOfSacrifice extends EnergyItems { private float weaponDamage; + public DaggerOfSacrifice(int id) { super(id); @@ -80,7 +79,7 @@ public class DaggerOfSacrifice extends EnergyItems for (int i = 0; i < 8; i++) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1)); } par2EntityLivingBase.setHealth(-1); @@ -99,7 +98,7 @@ public class DaggerOfSacrifice extends EnergyItems for (int i = 0; i < 8; i++) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1)); } par2EntityLivingBase.setHealth(-1); @@ -118,7 +117,7 @@ public class DaggerOfSacrifice extends EnergyItems for (int i = 0; i < 8; i++) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1)); } par2EntityLivingBase.setHealth(-1); @@ -137,7 +136,7 @@ public class DaggerOfSacrifice extends EnergyItems for (int i = 0; i < 8; i++) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1)); } par2EntityLivingBase.setHealth(-1); @@ -154,7 +153,7 @@ public class DaggerOfSacrifice extends EnergyItems for (int i = 0; i < 8; i++) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1)); } par2EntityLivingBase.setHealth(-1); @@ -183,8 +182,7 @@ public class DaggerOfSacrifice extends EnergyItems if (par2Block.blockID == Block.web.blockID) { return 15.0F; - } - else + } else { Material material = par2Block.blockMaterial; return material != Material.plants && material != Material.vine && material != Material.coral && material != Material.leaves && material != Material.pumpkin ? 1.0F : 1.5F; @@ -208,9 +206,9 @@ public class DaggerOfSacrifice extends EnergyItems public boolean findAndFillAltar(World world, EntityLivingBase sacrifice, int amount) { - int posX = (int)Math.round(sacrifice.posX - 0.5f); - int posY = (int)sacrifice.posY; - int posZ = (int)Math.round(sacrifice.posZ - 0.5f); + int posX = (int) Math.round(sacrifice.posX - 0.5f); + int posY = (int) sacrifice.posY; + int posZ = (int) Math.round(sacrifice.posZ - 0.5f); TEAltar altarEntity = this.getAltar(world, posX, posY, posZ); if (altarEntity == null) @@ -237,25 +235,25 @@ public class DaggerOfSacrifice extends EnergyItems if ((tileEntity instanceof TEAltar)) { - return (TEAltar)tileEntity; + return (TEAltar) tileEntity; } } if ((tileEntity instanceof TEAltar)) { - return (TEAltar)tileEntity; + return (TEAltar) tileEntity; } } if ((tileEntity instanceof TEAltar)) { - return (TEAltar)tileEntity; + return (TEAltar) tileEntity; } } if ((tileEntity instanceof TEAltar)) { - return (TEAltar)tileEntity; + return (TEAltar) tileEntity; } return null; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java b/BM_src/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java index 721c4ffa..2b5231d6 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java @@ -1,30 +1,22 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityEggInfo; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -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.EnumMovingObjectType; -import net.minecraft.util.Facing; -import net.minecraft.util.Icon; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; import WayofTime.alchemicalWizardry.common.summoning.SummoningRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.*; +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.*; +import net.minecraft.world.World; + +import java.util.List; public class DemonPlacer extends Item { @@ -56,7 +48,7 @@ public class DemonPlacer extends Item @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack par1ItemStack, int par2) { - EntityEggInfo entityegginfo = (EntityEggInfo)EntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage())); + EntityEggInfo entityegginfo = (EntityEggInfo) EntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage())); return entityegginfo != null ? (par2 == 0 ? entityegginfo.primaryColor : entityegginfo.secondaryColor) : 16777215; } @@ -69,8 +61,7 @@ public class DemonPlacer extends Item if (par3World.isRemote) { return true; - } - else + } else { int i1 = par3World.getBlockId(par4, par5, par6); par4 += Facing.offsetsXForSide[par7]; @@ -83,13 +74,13 @@ public class DemonPlacer extends Item d0 = 0.5D; } - Entity entity = spawnCreature(par3World, par1ItemStack.getItemDamage(), (double)par4 + 0.5D, (double)par5 + d0, (double)par6 + 0.5D, par1ItemStack); + Entity entity = spawnCreature(par3World, par1ItemStack.getItemDamage(), (double) par4 + 0.5D, (double) par5 + d0, (double) par6 + 0.5D, par1ItemStack); if (entity != null) { if (entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName()) { - ((EntityLiving)entity).setCustomNameTag(par1ItemStack.getDisplayName()); + ((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName()); } if (!par2EntityPlayer.capabilities.isCreativeMode) @@ -110,16 +101,14 @@ public class DemonPlacer extends Item if (par2World.isRemote) { return par1ItemStack; - } - else + } else { MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); if (movingobjectposition == null) { return par1ItemStack; - } - else + } else { if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) { @@ -139,13 +128,13 @@ public class DemonPlacer extends Item if (par2World.getBlockMaterial(i, j, k) == Material.water) { - Entity entity = spawnCreature(par2World, par1ItemStack.getItemDamage(), (double)i, (double)j, (double)k, par1ItemStack); + Entity entity = spawnCreature(par2World, par1ItemStack.getItemDamage(), (double) i, (double) j, (double) k, par1ItemStack); if (entity != null) { if (entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName()) { - ((EntityLiving)entity).setCustomNameTag(par1ItemStack.getDisplayName()); + ((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName()); } if (!par3EntityPlayer.capabilities.isCreativeMode) @@ -181,7 +170,7 @@ public class DemonPlacer extends Item if (entity != null && entity instanceof EntityLivingBase) { - EntityLiving entityliving = (EntityLiving)entity; + EntityLiving entityliving = (EntityLiving) entity; entity.setLocationAndAngles(par2, par4, par6, MathHelper.wrapAngleTo180_float(par0World.rand.nextFloat() * 360.0F), 0.0F); entityliving.rotationYawHead = entityliving.rotationYaw; entityliving.renderYawOffset = entityliving.rotationYaw; @@ -189,11 +178,11 @@ public class DemonPlacer extends Item //entityliving.onSpawnWithEgg((EntityLivingData)null); if (entityliving instanceof EntityDemon) { - ((EntityDemon)entityliving).setOwner(DemonPlacer.getOwnerName(itemStack)); + ((EntityDemon) entityliving).setOwner(DemonPlacer.getOwnerName(itemStack)); if (!DemonPlacer.getOwnerName(itemStack).equals("")) { - ((EntityDemon)entityliving).setTamed(true); + ((EntityDemon) entityliving).setTamed(true); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java b/BM_src/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java index d2ea2a2f..e07575a3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java @@ -1,13 +1,13 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class DemonicTelepositionFocus extends TelepositionFocus { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java b/BM_src/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java index c9205eab..937df61e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class DuskScribeTool extends ScribeTool { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/EarthInk.java b/BM_src/WayofTime/alchemicalWizardry/common/items/EarthInk.java index 105119a3..d01a3eea 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/EarthInk.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/EarthInk.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.item.Item; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.item.Item; public class EarthInk extends Item { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java index ac641d93..6f01c4c7 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java @@ -1,7 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.*; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -12,15 +15,8 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.FakePlayer; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.IBindable; -import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class EnergyBattery extends Item implements ArmourUpgrade, IBindable { @@ -65,6 +61,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable //par3List.add("LP: " + par2EntityPlayer.getEntityData().getInteger("currentEssence")); } + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); @@ -80,8 +77,8 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable double posX = par3EntityPlayer.posX; double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; - world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4)); + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4)); } if (!par3EntityPlayer.worldObj.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class))) @@ -135,8 +132,8 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable double posX = player.posX; double posY = player.posY; double posZ = player.posZ; - world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - float f = (float)1.0F; + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + float f = (float) 1.0F; float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; @@ -230,7 +227,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable String owner = itemTag.getString("ownerName"); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java index 41215864..08537f9e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java @@ -1,7 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; +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.player.EntityPlayer; @@ -10,10 +12,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.Icon; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class EnergyBazooka extends EnergyItems { @@ -22,6 +22,7 @@ public class EnergyBazooka extends EnergyItems private static int damage; //private static int delay; private static final int maxDelay = 150; + public EnergyBazooka(int id) { super(id); @@ -56,8 +57,7 @@ public class EnergyBazooka extends EnergyItems if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -71,7 +71,7 @@ public class EnergyBazooka extends EnergyItems if (par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 100); + par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); return par1ItemStack; } @@ -104,7 +104,7 @@ public class EnergyBazooka extends EnergyItems par3EntityPlayer.motionX = -vec.xCoord * wantedVelocity; par3EntityPlayer.motionY = -vec.yCoord * wantedVelocity; par3EntityPlayer.motionZ = -vec.zCoord * wantedVelocity; - par2World.playSoundEffect((double)((float)par3EntityPlayer.posX + 0.5F), (double)((float)par3EntityPlayer.posY + 0.5F), (double)((float)par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); + par2World.playSoundEffect((double) ((float) par3EntityPlayer.posX + 0.5F), (double) ((float) par3EntityPlayer.posY + 0.5F), (double) ((float) par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); par3EntityPlayer.fallDistance = 0; return par1ItemStack; } @@ -117,7 +117,7 @@ public class EnergyBazooka extends EnergyItems return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -157,8 +157,7 @@ public class EnergyBazooka extends EnergyItems if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java index 46fff0ec..e35147ee 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java @@ -1,7 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; +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.player.EntityPlayer; @@ -9,10 +11,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.Icon; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class EnergyBlast extends EnergyItems { @@ -21,6 +21,7 @@ public class EnergyBlast extends EnergyItems private static int damage; //private static int delay; private static final int maxDelay = 15; + public EnergyBlast(int id) { super(id); @@ -56,8 +57,7 @@ public class EnergyBlast extends EnergyItems if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -71,7 +71,7 @@ public class EnergyBlast extends EnergyItems if (par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 100); + par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); return par1ItemStack; } @@ -110,7 +110,7 @@ public class EnergyBlast extends EnergyItems return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -152,8 +152,7 @@ public class EnergyBlast extends EnergyItems if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyItems.java b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyItems.java index 30f5d072..6a68023b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyItems.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergyItems.java @@ -1,5 +1,11 @@ package WayofTime.alchemicalWizardry.common.items; +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.IBindable; +import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -7,12 +13,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.IBindable; -import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.common.network.PacketDispatcher; public class EnergyItems extends Item implements IBindable { @@ -43,8 +43,8 @@ public class EnergyItems extends Item implements IBindable double posX = player.posX; double posY = player.posY; double posZ = player.posZ; - world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - float f = (float)1.0F; + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + float f = (float) 1.0F; float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; @@ -88,8 +88,8 @@ public class EnergyItems extends Item implements IBindable if (particles) { - PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4)); - world.playSoundEffect((double)((float)player.posX + 0.5F), (double)((float)player.posY + 0.5F), (double)((float)player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4)); + world.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); } } @@ -100,8 +100,7 @@ public class EnergyItems extends Item implements IBindable PacketDispatcher.sendPacketToServer(PacketHandler.getPacket(itemTag.getString("ownerName"), -damageToBeDone, 0)); return true; - } - else + } else { return true; } @@ -112,8 +111,7 @@ public class EnergyItems extends Item implements IBindable if (!player.worldObj.isRemote) { return syphonAndDamageWhileInContainer(ist, player, damageToBeDone); - } - else + } else { World world = player.worldObj; @@ -124,8 +122,8 @@ public class EnergyItems extends Item implements IBindable double posZ = player.posZ; //if(particles) { - PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4)); - world.playSoundEffect((double)((float)player.posX + 0.5F), (double)((float)player.posY + 0.5F), (double)((float)player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4)); + world.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); } } } @@ -146,7 +144,7 @@ public class EnergyItems extends Item implements IBindable } World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName); + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); if (data == null) { @@ -187,7 +185,7 @@ public class EnergyItems extends Item implements IBindable } World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName); + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); if (data == null) { @@ -221,11 +219,10 @@ public class EnergyItems extends Item implements IBindable if (user.getHealth() <= 0.1f) { - user.onDeath(DamageSource.generic); + user.onDeath(DamageSource.generic); } } - } - else if (energySyphoned >= 100) + } else if (energySyphoned >= 100) { if (!user.capabilities.isCreativeMode) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergySword.java b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergySword.java index 30434f58..349a5e8c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/EnergySword.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/EnergySword.java @@ -1,7 +1,8 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -15,9 +16,8 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.Icon; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class EnergySword extends ItemSword { @@ -73,8 +73,7 @@ public class EnergySword extends ItemSword if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -91,9 +90,9 @@ public class EnergySword extends ItemSword { if (par3EntityLivingBase instanceof EntityPlayer) { - EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer)par3EntityLivingBase); + EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase); - if (!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3EntityLivingBase, this.getEnergyUsed())) + if (!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) { //this.damagePlayer(null, (EntityPlayer)par3EntityLivingBase, (this.getEnergyUsed() + 99) / 100); } @@ -111,7 +110,7 @@ public class EnergySword extends ItemSword if (par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 100); + par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); return par1ItemStack; } @@ -137,7 +136,7 @@ public class EnergySword extends ItemSword return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -206,8 +205,7 @@ public class EnergySword extends ItemSword if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -225,8 +223,7 @@ public class EnergySword extends ItemSword if (par2Block.blockID == Block.web.blockID) { return 15.0F; - } - else + } else { Material material = par2Block.blockMaterial; return material != Material.plants && material != Material.vine && material != Material.coral && material != Material.leaves && material != Material.pumpkin ? 1.0F : 1.5F; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/FireInk.java b/BM_src/WayofTime/alchemicalWizardry/common/items/FireInk.java index ba0568e9..113660d1 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/FireInk.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/FireInk.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.item.Item; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.item.Item; public class FireInk extends Item { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java b/BM_src/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java index e86346a3..cabe42df 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java @@ -1,7 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.IBindable; +import WayofTime.alchemicalWizardry.common.ModItems; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -12,12 +17,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.FakePlayer; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.IBindable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class ItemDiabloKey extends EnergyItems { @@ -52,6 +53,7 @@ public class ItemDiabloKey extends EnergyItems //par3List.add("LP: " + par2EntityPlayer.getEntityData().getInteger("currentEssence")); } + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); @@ -67,8 +69,8 @@ public class ItemDiabloKey extends EnergyItems double posX = par3EntityPlayer.posX; double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; - world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4)); + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4)); } if (!par3EntityPlayer.worldObj.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class))) @@ -118,8 +120,8 @@ public class ItemDiabloKey extends EnergyItems @SideOnly(Side.CLIENT) public void getSubItems(int id, CreativeTabs creativeTab, List list) { - list.add(new ItemStack(AlchemicalWizardry.itemKeyOfDiablo)); - ItemStack boundKey = new ItemStack(AlchemicalWizardry.itemKeyOfDiablo); + list.add(new ItemStack(ModItems.itemKeyOfDiablo)); + ItemStack boundKey = new ItemStack(ModItems.itemKeyOfDiablo); EnergyItems.checkAndSetItemOwner(boundKey, "Server-wide Soul Network"); list.add(boundKey); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java b/BM_src/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java index 3269ab84..0f952ed5 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java @@ -1,7 +1,13 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModBlocks; +import WayofTime.alchemicalWizardry.common.ModItems; +import WayofTime.alchemicalWizardry.common.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.common.rituals.Rituals; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -11,12 +17,8 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.common.rituals.Rituals; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class ItemRitualDiviner extends EnergyItems { @@ -46,8 +48,7 @@ public class ItemRitualDiviner extends EnergyItems if (this.getMaxRuneDisplacement(par1ItemStack) == 1) { par3List.add("Can place Dusk runes"); - } - else + } else { par3List.add("Can not place Dusk runes"); } @@ -114,8 +115,7 @@ public class ItemRitualDiviner extends EnergyItems int ritualID = this.getCurrentRitual(par1ItemStack); return "Ritual: " + Rituals.getNameOfRitual(ritualID); //par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName")); - } - else + } else { return super.getItemStackDisplayName(par1ItemStack); } @@ -130,7 +130,7 @@ public class ItemRitualDiviner extends EnergyItems if (tileEntity instanceof TEMasterStone) { - TEMasterStone masterStone = (TEMasterStone)tileEntity; + TEMasterStone masterStone = (TEMasterStone) tileEntity; List ritualList = Rituals.getRitualList(this.getCurrentRitual(par1ItemStack) + 1); int playerInvRitualStoneLocation = -1; @@ -141,7 +141,7 @@ public class ItemRitualDiviner extends EnergyItems continue; } - if (new ItemStack(AlchemicalWizardry.ritualStone).isItemEqual(playerInventory[i])) + if (new ItemStack(ModBlocks.ritualStone).isItemEqual(playerInventory[i])) { playerInvRitualStoneLocation = i; break; @@ -165,7 +165,7 @@ public class ItemRitualDiviner extends EnergyItems par2EntityPlayer.inventory.decrStackSize(playerInvRitualStoneLocation, 1); } - par3World.setBlock(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ(), AlchemicalWizardry.ritualStone.blockID, rc.getStoneType(), 3); + par3World.setBlock(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ(), ModBlocks.ritualStone.blockID, rc.getStoneType(), 3); if (par3World.isRemote) { @@ -176,12 +176,11 @@ public class ItemRitualDiviner extends EnergyItems return true; } - } - else + } else { int blockID = par3World.getBlockId(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ()); - if (blockID == AlchemicalWizardry.ritualStone.blockID) + if (blockID == ModBlocks.ritualStone.blockID) { int metadata = par3World.getBlockMetadata(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ()); @@ -197,8 +196,7 @@ public class ItemRitualDiviner extends EnergyItems EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed()); return true; } - } - else + } else { par3World.playAuxSFX(0000, par4, par5 + 1, par6, 0); return true; @@ -231,8 +229,7 @@ public class ItemRitualDiviner extends EnergyItems if (currentRitualID + 1 >= maxRitualID) { this.setCurrentRitual(par1ItemStack, 0); - } - else + } else { this.setCurrentRitual(par1ItemStack, currentRitualID + 1); } @@ -293,9 +290,9 @@ public class ItemRitualDiviner extends EnergyItems @SideOnly(Side.CLIENT) public void getSubItems(int id, CreativeTabs creativeTab, List list) { - list.add(new ItemStack(AlchemicalWizardry.itemRitualDiviner)); - ItemStack duskRitualDivinerStack = new ItemStack(AlchemicalWizardry.itemRitualDiviner); - ((ItemRitualDiviner)duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1); + list.add(new ItemStack(ModItems.itemRitualDiviner)); + ItemStack duskRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner); + ((ItemRitualDiviner) duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1); list.add(duskRitualDivinerStack); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/ItemSanguineArmour.java b/BM_src/WayofTime/alchemicalWizardry/common/items/ItemSanguineArmour.java index 4b3dfbaa..0c84aea8 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/ItemSanguineArmour.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/ItemSanguineArmour.java @@ -1,7 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ArmourUpgrade; +import WayofTime.alchemicalWizardry.common.ModItems; +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.EntityLivingBase; @@ -13,10 +16,8 @@ import net.minecraft.world.World; import thaumcraft.api.IGoggles; import thaumcraft.api.IVisDiscounter; import thaumcraft.api.nodes.IRevealer; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.ArmourUpgrade; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class ItemSanguineArmour extends ItemArmor implements IRevealer, ArmourUpgrade, IGoggles, IVisDiscounter { @@ -41,7 +42,7 @@ public class ItemSanguineArmour extends ItemArmor implements IRevealer, ArmourUp { //if(AlchemicalWizardry.isThaumcraftLoaded) { - if (itemID == AlchemicalWizardry.sanguineHelmet.itemID) + if (itemID == ModItems.sanguineHelmet.itemID) { return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java b/BM_src/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java index 2a2657b3..074317fc 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java @@ -1,16 +1,16 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class LavaCrystal extends EnergyItems { @@ -85,7 +85,7 @@ public class LavaCrystal extends EnergyItems } World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName); + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); if (data == null) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java b/BM_src/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java index caea0e10..7b21d110 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class MasterBloodOrb extends EnergyBattery { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java b/BM_src/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java index 44500044..748bf06e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java @@ -5,9 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java b/BM_src/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java index eec3be65..cf8fef8b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java @@ -1,13 +1,13 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class ReinforcedTelepositionFocus extends TelepositionFocus { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java b/BM_src/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java index 1e706fbc..b355e558 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java @@ -1,7 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -11,10 +13,8 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.FakePlayer; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class SacrificialDagger extends Item { @@ -54,8 +54,8 @@ public class SacrificialDagger extends Item double posX = par3EntityPlayer.posX; double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; - par2World.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); - float f = (float)1.0F; + par2World.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); + float f = (float) 1.0F; float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; @@ -83,9 +83,9 @@ public class SacrificialDagger extends Item public void findAndFillAltar(World world, EntityPlayer player, int amount) { - int posX = (int)Math.round(player.posX - 0.5f); - int posY = (int)player.posY; - int posZ = (int)Math.round(player.posZ - 0.5f); + int posX = (int) Math.round(player.posX - 0.5f); + int posY = (int) player.posY; + int posZ = (int) Math.round(player.posZ - 0.5f); TEAltar altarEntity = getAltar(world, posX, posY, posZ); if (altarEntity == null) @@ -111,25 +111,25 @@ public class SacrificialDagger extends Item if ((tileEntity instanceof TEAltar)) { - return (TEAltar)tileEntity; + return (TEAltar) tileEntity; } } if ((tileEntity instanceof TEAltar)) { - return (TEAltar)tileEntity; + return (TEAltar) tileEntity; } } if ((tileEntity instanceof TEAltar)) { - return (TEAltar)tileEntity; + return (TEAltar) tileEntity; } } if ((tileEntity instanceof TEAltar)) { - return (TEAltar)tileEntity; + return (TEAltar) tileEntity; } return null; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/ScribeTool.java b/BM_src/WayofTime/alchemicalWizardry/common/items/ScribeTool.java index 12dc4ae5..578512e9 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/ScribeTool.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/ScribeTool.java @@ -1,15 +1,16 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; + +import java.util.List; public class ScribeTool extends EnergyItems { private int meta; + public ScribeTool(int id, int inkType) { super(id); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java b/BM_src/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java index adde1a61..aae480c4 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java @@ -1,16 +1,16 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class TelepositionFocus extends EnergyItems { @@ -89,8 +89,7 @@ public class TelepositionFocus extends EnergyItems if (!(itemStack.stackTagCompound == null)) { return itemStack.stackTagCompound.getInteger("xCoord"); - } - else + } else { return 0; } @@ -101,8 +100,7 @@ public class TelepositionFocus extends EnergyItems if (!(itemStack.stackTagCompound == null)) { return itemStack.stackTagCompound.getInteger("yCoord"); - } - else + } else { return 0; } @@ -113,8 +111,7 @@ public class TelepositionFocus extends EnergyItems if (!(itemStack.stackTagCompound == null)) { return itemStack.stackTagCompound.getInteger("zCoord"); - } - else + } else { return 0; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/WaterInk.java b/BM_src/WayofTime/alchemicalWizardry/common/items/WaterInk.java index c418cab0..e88044e1 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/WaterInk.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/WaterInk.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.item.Item; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.item.Item; public class WaterInk extends Item { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java b/BM_src/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java index fd90f535..5c269f2f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import net.minecraft.client.renderer.texture.IconRegister; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class WaterScribeTool extends ScribeTool { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java index 9ded99a0..a77ca7ea 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.alchemy.AlchemyPotionHelper; +import com.google.common.collect.HashMultimap; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.attributes.Attribute; @@ -22,13 +21,12 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.alchemy.AlchemyPotionHelper; -import com.google.common.collect.HashMultimap; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; public class AlchemyFlask extends Item { @@ -59,13 +57,12 @@ public class AlchemyFlask extends Item for (int i = 0; i < nbttaglist.tagCount(); ++i) { - NBTTagCompound nbttagcompound = (NBTTagCompound)nbttaglist.tagAt(i); + NBTTagCompound nbttagcompound = (NBTTagCompound) nbttaglist.tagAt(i); arraylist.add(AlchemyPotionHelper.readEffectFromNBT(nbttagcompound)); } return arraylist; - } - else + } else { return null; } @@ -85,8 +82,7 @@ public class AlchemyFlask extends Item } return newList; - } - else + } else { return null; } @@ -205,7 +201,7 @@ public class AlchemyFlask extends Item if (list != null) { - for (AlchemyPotionHelper aph: list) + for (AlchemyPotionHelper aph : list) { if (aph.getPotionID() == potionID) { @@ -224,7 +220,7 @@ public class AlchemyFlask extends Item if (list != null) { - for (AlchemyPotionHelper aph: list) + for (AlchemyPotionHelper aph : list) { if (aph.getPotionID() == potionID) { @@ -247,8 +243,7 @@ public class AlchemyFlask extends Item if (getEffects(par1ItemStack) != null) { return getEffects(par1ItemStack).size(); - } - else + } else { return 0; } @@ -261,7 +256,7 @@ public class AlchemyFlask extends Item if (list != null) { - for (AlchemyPotionHelper aph: list) + for (AlchemyPotionHelper aph : list) { if (aph.getPotionID() == potionID) { @@ -277,8 +272,7 @@ public class AlchemyFlask extends Item this.setEffects(par1ItemStack, list); return true; } - } - else + } else { list = new ArrayList(); list.add(new AlchemyPotionHelper(potionID, tickDuration, 0, 0)); @@ -306,7 +300,7 @@ public class AlchemyFlask extends Item while (iterator.hasNext()) { - PotionEffect potioneffect = (PotionEffect)iterator.next(); + PotionEffect potioneffect = (PotionEffect) iterator.next(); String s = StatCollector.translateToLocal(potioneffect.getEffectName()).trim(); Potion potion = Potion.potionTypes[potioneffect.getPotionID()]; Map map = potion.func_111186_k(); @@ -317,10 +311,10 @@ public class AlchemyFlask extends Item while (iterator1.hasNext()) { - Entry entry = (Entry)iterator1.next(); - AttributeModifier attributemodifier = (AttributeModifier)entry.getValue(); + Entry entry = (Entry) iterator1.next(); + AttributeModifier attributemodifier = (AttributeModifier) entry.getValue(); AttributeModifier attributemodifier1 = new AttributeModifier(attributemodifier.getName(), potion.func_111183_a(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation()); - hashmultimap.put(((Attribute)entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1); + hashmultimap.put(((Attribute) entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1); } } @@ -337,14 +331,12 @@ public class AlchemyFlask extends Item if (potion.isBadEffect()) { par3List.add(EnumChatFormatting.RED + s); - } - else + } else { par3List.add(EnumChatFormatting.GRAY + s); } } - } - else + } else { String s1 = StatCollector.translateToLocal("potion.empty").trim(); par3List.add(EnumChatFormatting.GRAY + s1); @@ -358,28 +350,26 @@ public class AlchemyFlask extends Item while (iterator.hasNext()) { - Entry entry1 = (Entry)iterator.next(); - AttributeModifier attributemodifier2 = (AttributeModifier)entry1.getValue(); + Entry entry1 = (Entry) iterator.next(); + AttributeModifier attributemodifier2 = (AttributeModifier) entry1.getValue(); double d0 = attributemodifier2.getAmount(); double d1; if (attributemodifier2.getOperation() != 1 && attributemodifier2.getOperation() != 2) { d1 = attributemodifier2.getAmount(); - } - else + } else { d1 = attributemodifier2.getAmount() * 100.0D; } if (d0 > 0.0D) { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[] {ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String)entry1.getKey())})); - } - else if (d0 < 0.0D) + par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); + } else if (d0 < 0.0D) { d1 *= -1.0D; - par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[] {ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String)entry1.getKey())})); + par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); } } } @@ -390,8 +380,7 @@ public class AlchemyFlask extends Item if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().getBoolean("throwable")) { return true; - } - else + } else { return false; } @@ -425,8 +414,8 @@ public class AlchemyFlask extends Item for (PotionEffect pe : potionList) { NBTTagCompound d = new NBTTagCompound(); - d.setByte("Id", (byte)pe.getPotionID()); - d.setByte("Amplifier", (byte)pe.getAmplifier()); + d.setByte("Id", (byte) pe.getPotionID()); + d.setByte("Amplifier", (byte) pe.getAmplifier()); //byte b1 = par0NBTTagCompound.getByte("Amplifier"); d.setInteger("Duration", pe.getDuration()); //int i = par0NBTTagCompound.getInteger("Duration"); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java index 7052a452..3bbd3ce9 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.List; - -import org.lwjgl.input.Keyboard; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModItems; import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -13,6 +10,9 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import org.lwjgl.input.Keyboard; + +import java.util.List; public class AlchemyReagent extends Item { @@ -28,61 +28,61 @@ public class AlchemyReagent extends Item @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister) { - if (this.itemID == AlchemicalWizardry.incendium.itemID) + if (this.itemID == ModItems.incendium.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Incendium"); return; } - if (this.itemID == AlchemicalWizardry.magicales.itemID) + if (this.itemID == ModItems.magicales.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Magicales"); return; } - if (this.itemID == AlchemicalWizardry.sanctus.itemID) + if (this.itemID == ModItems.sanctus.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Sanctus"); return; } - if (this.itemID == AlchemicalWizardry.aether.itemID) + if (this.itemID == ModItems.aether.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aether"); return; } - if (this.itemID == AlchemicalWizardry.simpleCatalyst.itemID) + if (this.itemID == ModItems.simpleCatalyst.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SimpleCatalyst"); return; } - if (this.itemID == AlchemicalWizardry.crepitous.itemID) + if (this.itemID == ModItems.crepitous.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crepitous"); return; } - if (this.itemID == AlchemicalWizardry.crystallos.itemID) + if (this.itemID == ModItems.crystallos.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crystallos"); return; } - if (this.itemID == AlchemicalWizardry.terrae.itemID) + if (this.itemID == ModItems.terrae.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Terrae"); return; } - if (this.itemID == AlchemicalWizardry.aquasalus.itemID) + if (this.itemID == ModItems.aquasalus.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aquasalus"); return; } - if (this.itemID == AlchemicalWizardry.tennebrae.itemID) + if (this.itemID == ModItems.tennebrae.itemID) { this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Tennebrae"); return; @@ -102,7 +102,7 @@ public class AlchemyReagent extends Item { par3List.add(EnumChatFormatting.BLUE + "Recipe:"); - for (ItemStack item: recipe) + for (ItemStack item : recipe) { if (item != null) { @@ -110,8 +110,7 @@ public class AlchemyReagent extends Item } } } - } - else + } else { par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-"); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java index f4c2a050..7846ae0f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class AverageLengtheningCatalyst extends LengtheningCatalyst { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java index 2cf5459f..7f818798 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class AveragePowerCatalyst extends PowerCatalyst { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java index 3accc178..492de908 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.Random; - -import net.minecraft.client.renderer.texture.IconRegister; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; + +import java.util.Random; public class EnhancedFillingAgent extends WeakFillingAgent { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/EnhancedTelepositionFocus.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/EnhancedTelepositionFocus.java index 009eb5e4..9780df0e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/EnhancedTelepositionFocus.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/EnhancedTelepositionFocus.java @@ -1,14 +1,14 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class EnhancedTelepositionFocus extends TelepositionFocus { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java index 9d7268e9..8feefcae 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class GreaterLengtheningCatalyst extends LengtheningCatalyst { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java index e831e609..476088d6 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class GreaterPowerCatalyst extends PowerCatalyst { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java index a3419949..a8353dd3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java @@ -1,17 +1,15 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import org.lwjgl.input.Keyboard; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.ICatalyst; import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import org.lwjgl.input.Keyboard; + +import java.util.List; public class LengtheningCatalyst extends Item implements ICatalyst { @@ -49,7 +47,7 @@ public class LengtheningCatalyst extends Item implements ICatalyst { par3List.add(EnumChatFormatting.BLUE + "Recipe:"); - for (ItemStack item: recipe) + for (ItemStack item : recipe) { if (item != null) { @@ -57,8 +55,7 @@ public class LengtheningCatalyst extends Item implements ICatalyst } } } - } - else + } else { par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-"); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java index 53caca59..53400242 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class MundaneLengtheningCatalyst extends LengtheningCatalyst { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java index aab51de4..6bf4e443 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class MundanePowerCatalyst extends PowerCatalyst { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java index 134578fa..c973be52 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java @@ -1,17 +1,15 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import org.lwjgl.input.Keyboard; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.ICatalyst; import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import org.lwjgl.input.Keyboard; + +import java.util.List; public class PowerCatalyst extends Item implements ICatalyst { @@ -49,7 +47,7 @@ public class PowerCatalyst extends Item implements ICatalyst { par3List.add(EnumChatFormatting.BLUE + "Recipe:"); - for (ItemStack item: recipe) + for (ItemStack item : recipe) { if (item != null) { @@ -57,8 +55,7 @@ public class PowerCatalyst extends Item implements ICatalyst } } } - } - else + } else { par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-"); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java index f14f5eef..cd119f57 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java @@ -1,20 +1,18 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.List; - -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.util.EnumChatFormatting; - -import org.lwjgl.input.Keyboard; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.IBindingAgent; import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +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.util.EnumChatFormatting; +import org.lwjgl.input.Keyboard; + +import java.util.List; public class StandardBindingAgent extends Item implements IBindingAgent { @@ -50,7 +48,7 @@ public class StandardBindingAgent extends Item implements IBindingAgent { par3List.add(EnumChatFormatting.BLUE + "Recipe:"); - for (ItemStack item: recipe) + for (ItemStack item : recipe) { if (item != null) { @@ -58,8 +56,7 @@ public class StandardBindingAgent extends Item implements IBindingAgent } } } - } - else + } else { par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-"); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java index e12fc7ee..3f15b321 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import net.minecraft.client.renderer.texture.IconRegister; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class StandardFillingAgent extends WeakFillingAgent { @@ -24,7 +24,7 @@ public class StandardFillingAgent extends WeakFillingAgent if (potionEffects >= 1 && potionEffects <= 3) { - return (int)(4 * (Math.pow(0.5f, potionEffects - 1) + 0.01f)); + return (int) (4 * (Math.pow(0.5f, potionEffects - 1) + 0.01f)); } return 0; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java index 8c2fbedc..af30959f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import net.minecraft.client.renderer.texture.IconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; public class WeakBindingAgent extends StandardBindingAgent { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java index 9e949168..8096c453 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java @@ -1,21 +1,19 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.List; -import java.util.Random; - -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.util.EnumChatFormatting; - -import org.lwjgl.input.Keyboard; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.IFillingAgent; import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +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.util.EnumChatFormatting; +import org.lwjgl.input.Keyboard; + +import java.util.List; +import java.util.Random; public class WeakFillingAgent extends Item implements IFillingAgent { @@ -39,9 +37,8 @@ public class WeakFillingAgent extends Item implements IFillingAgent { if (rand.nextFloat() > 0.5f) { - return(4 - potionEffects); - } - else + return (4 - potionEffects); + } else { return 3 - potionEffects; } @@ -70,7 +67,7 @@ public class WeakFillingAgent extends Item implements IFillingAgent { par3List.add(EnumChatFormatting.BLUE + "Recipe:"); - for (ItemStack item: recipe) + for (ItemStack item : recipe) { if (item != null) { @@ -78,8 +75,7 @@ public class WeakFillingAgent extends Item implements IFillingAgent } } } - } - else + } else { par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-"); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/AirSigil.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/AirSigil.java index f54893c5..03ffe4da 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/AirSigil.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/AirSigil.java @@ -1,17 +1,17 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import java.util.List; - -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Vec3; -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; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +import java.util.List; public class AirSigil extends EnergyItems implements ArmourUpgrade { @@ -66,7 +66,7 @@ public class AirSigil extends EnergyItems implements ArmourUpgrade par3EntityPlayer.motionX = vec.xCoord * wantedVelocity; par3EntityPlayer.motionY = vec.yCoord * wantedVelocity; par3EntityPlayer.motionZ = vec.zCoord * wantedVelocity; - par2World.playSoundEffect((double)((float)par3EntityPlayer.posX + 0.5F), (double)((float)par3EntityPlayer.posY + 0.5F), (double)((float)par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); + par2World.playSoundEffect((double) ((float) par3EntityPlayer.posX + 0.5F), (double) ((float) par3EntityPlayer.posY + 0.5F), (double) ((float) par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); par3EntityPlayer.fallDistance = 0; if (!par3EntityPlayer.capabilities.isCreativeMode) @@ -74,8 +74,7 @@ public class AirSigil extends EnergyItems implements ArmourUpgrade if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { } - } - else + } else { return par1ItemStack; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/DivinationSigil.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/DivinationSigil.java index 27901077..826dff19 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/DivinationSigil.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/DivinationSigil.java @@ -1,7 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ArmourUpgrade; +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -10,13 +15,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class DivinationSigil extends Item implements ArmourUpgrade { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/ItemBloodLightSigil.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/ItemBloodLightSigil.java index a537cd43..0d6d6593 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/ItemBloodLightSigil.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/ItemBloodLightSigil.java @@ -1,18 +1,19 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModBlocks; +import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile; +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.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class ItemBloodLightSigil extends EnergyItems { @@ -59,32 +60,32 @@ public class ItemBloodLightSigil extends EnergyItems if (par7 == 0 && par3World.isAirBlock(par4, par5 - 1, par6)) { - par3World.setBlock(par4, par5 - 1, par6, AlchemicalWizardry.blockBloodLight.blockID); + par3World.setBlock(par4, par5 - 1, par6, ModBlocks.blockBloodLight.blockID); } if (par7 == 1 && par3World.isAirBlock(par4, par5 + 1, par6)) { - par3World.setBlock(par4, par5 + 1, par6, AlchemicalWizardry.blockBloodLight.blockID); + par3World.setBlock(par4, par5 + 1, par6, ModBlocks.blockBloodLight.blockID); } if (par7 == 2 && par3World.isAirBlock(par4, par5, par6 - 1)) { - par3World.setBlock(par4, par5, par6 - 1 , AlchemicalWizardry.blockBloodLight.blockID); + par3World.setBlock(par4, par5, par6 - 1, ModBlocks.blockBloodLight.blockID); } if (par7 == 3 && par3World.isAirBlock(par4, par5, par6 + 1)) { - par3World.setBlock(par4, par5, par6 + 1 , AlchemicalWizardry.blockBloodLight.blockID); + par3World.setBlock(par4, par5, par6 + 1, ModBlocks.blockBloodLight.blockID); } if (par7 == 4 && par3World.isAirBlock(par4 - 1, par5, par6)) { - par3World.setBlock(par4 - 1, par5, par6, AlchemicalWizardry.blockBloodLight.blockID); + par3World.setBlock(par4 - 1, par5, par6, ModBlocks.blockBloodLight.blockID); } if (par7 == 5 && par3World.isAirBlock(par4 + 1, par5, par6)) { - par3World.setBlock(par4 + 1, par5, par6, AlchemicalWizardry.blockBloodLight.blockID); + par3World.setBlock(par4 + 1, par5, par6, ModBlocks.blockBloodLight.blockID); } return true; @@ -123,7 +124,7 @@ public class ItemBloodLightSigil extends EnergyItems return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -134,7 +135,7 @@ public class ItemBloodLightSigil extends EnergyItems { if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer) { - EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3Entity, getEnergyUsed()); + EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed()); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/LavaSigil.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/LavaSigil.java index 8243d11d..3366a0c2 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/LavaSigil.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/LavaSigil.java @@ -1,7 +1,11 @@ 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.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -13,16 +17,14 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class LavaSigil extends ItemBucket implements ArmourUpgrade { - /** field for checking if the bucket has been filled. */ + /** + * field for checking if the bucket has been filled. + */ private int isFull = Block.lavaMoving.blockID; private int energyUsed; @@ -76,17 +78,16 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade } float f = 1.0F; - double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double)f; - double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double)f + 1.62D - (double)par3EntityPlayer.yOffset; - double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double)f; + double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double) f; + double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double) f + 1.62D - (double) par3EntityPlayer.yOffset; + double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double) f; boolean flag = this.isFull == 0; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, flag); if (movingobjectposition == null) { return par1ItemStack; - } - else + } else { if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) { @@ -102,8 +103,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade if (this.isFull == 0) { //Empty - } - else + } else { if (movingobjectposition.sideHit == 0) { @@ -147,8 +147,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { } - } - else + } else { return par1ItemStack; } @@ -168,16 +167,13 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade if (this.isFull <= 0) { return false; - } - else if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlockMaterial(par8, par9, par10).isSolid()) + } else if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlockMaterial(par8, par9, par10).isSolid()) { return false; - } - else if ((par1World.getBlockId(par8, par9, par10) == Block.lavaMoving.blockID || par1World.getBlockId(par8, par9, par10) == Block.lavaStill.blockID) && par1World.getBlockMetadata(par8, par9, par10) == 0) + } else if ((par1World.getBlockId(par8, par9, par10) == Block.lavaMoving.blockID || par1World.getBlockId(par8, par9, par10) == Block.lavaStill.blockID) && par1World.getBlockMetadata(par8, par9, par10) == 0) { return false; - } - else + } else { par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); return true; @@ -196,7 +192,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade //Heals the player using the item. If the player is at full health, or if the durability cannot be used any more, //the item is not used. -// protected void damagePlayer(World world, EntityPlayer player, int damage) + // protected void damagePlayer(World world, EntityPlayer player, int damage) // { // if (world != null) // { @@ -258,8 +254,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade } return true; - } - else + } else { return true; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java index fde21ae9..9e2247a3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java @@ -1,7 +1,9 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +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.player.EntityPlayer; @@ -11,10 +13,8 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.Icon; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class SigilOfElementalAffinity extends EnergyItems { @@ -22,6 +22,7 @@ public class SigilOfElementalAffinity extends EnergyItems private static Icon activeIcon; @SideOnly(Side.CLIENT) private static Icon passiveIcon; + public SigilOfElementalAffinity(int id) { super(id); @@ -42,8 +43,7 @@ public class SigilOfElementalAffinity extends EnergyItems if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -74,8 +74,7 @@ public class SigilOfElementalAffinity extends EnergyItems if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -88,8 +87,7 @@ public class SigilOfElementalAffinity extends EnergyItems if (par1 == 1) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -116,7 +114,7 @@ public class SigilOfElementalAffinity extends EnergyItems if (tag.getBoolean("isActive")) { par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200); + tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true)); par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true)); @@ -128,8 +126,7 @@ public class SigilOfElementalAffinity extends EnergyItems { } } - } - else + } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); } @@ -145,7 +142,7 @@ public class SigilOfElementalAffinity extends EnergyItems return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java index 1e1fc16b..a6d4661c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java @@ -1,14 +1,11 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockCocoa; -import net.minecraft.block.BlockCrops; -import net.minecraft.block.BlockDirectional; -import net.minecraft.block.BlockMushroom; -import net.minecraft.block.BlockSapling; -import net.minecraft.block.BlockStem; +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.block.*; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -21,11 +18,8 @@ import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.entity.player.BonemealEvent; -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 java.util.List; public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade { @@ -54,8 +48,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -86,8 +79,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -100,8 +92,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade if (par1 == 1) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -149,14 +140,13 @@ public class SigilOfGrowth 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()); } @@ -172,7 +162,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -183,14 +173,14 @@ public class SigilOfGrowth 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 = 2; - int posX = (int)Math.round(par3Entity.posX - 0.5f); - int posY = (int)par3Entity.posY; - int posZ = (int)Math.round(par3Entity.posZ - 0.5f); + int posX = (int) Math.round(par3Entity.posX - 0.5f); + int posY = (int) par3Entity.posY; + int posZ = (int) Math.round(par3Entity.posZ - 0.5f); for (int ix = posX - range; ix <= posX + range; ix++) { @@ -235,15 +225,14 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade { if (!par1World.isRemote) { - if ((double)par1World.rand.nextFloat() < 0.45D) + if ((double) par1World.rand.nextFloat() < 0.45D) { - ((BlockSapling)Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand); + ((BlockSapling) Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand); } } return true; - } - else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID) + } else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID) { if (l != Block.melonStem.blockID && l != Block.pumpkinStem.blockID) { @@ -252,18 +241,16 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade if (par1World.getBlockMetadata(par2, par3, par4) == 7) { return false; - } - else + } else { if (!par1World.isRemote) { - ((BlockCrops)Block.blocksList[l]).fertilize(par1World, par2, par3, par4); + ((BlockCrops) Block.blocksList[l]).fertilize(par1World, par2, par3, par4); } return true; } - } - else + } else { int i1; int j1; @@ -278,8 +265,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade if (k1 >= 2) { return false; - } - else + } else { if (!par1World.isRemote) { @@ -289,12 +275,10 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade return true; } - } - else if (l != Block.grass.blockID) + } else if (l != Block.grass.blockID) { return false; - } - else + } else { if (!par1World.isRemote) { @@ -326,8 +310,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade { par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3); } - } - else + } else { ForgeHooks.plantGrass(par1World, j1, k1, l1); } @@ -338,28 +321,25 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade return true; } } - } - else if (par1World.getBlockMetadata(par2, par3, par4) == 7) + } else if (par1World.getBlockMetadata(par2, par3, par4) == 7) { return false; - } - else + } else { if (!par1World.isRemote) { - ((BlockStem)Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4); + ((BlockStem) Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4); } return true; } - } - else + } else { if (!par1World.isRemote) { - if ((double)par1World.rand.nextFloat() < 0.4D) + if ((double) par1World.rand.nextFloat() < 0.4D) { - ((BlockMushroom)Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand); + ((BlockMushroom) Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand); } } @@ -372,9 +352,9 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade { int range = 5; int verticalRange = 2; - int posX = (int)Math.round(player.posX - 0.5f); - int posY = (int)player.posY; - int posZ = (int)Math.round(player.posZ - 0.5f); + int posX = (int) Math.round(player.posX - 0.5f); + int posY = (int) player.posY; + int posZ = (int) Math.round(player.posZ - 0.5f); for (int ix = posX - range; ix <= posX + range; ix++) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java index 55722567..5300ce63 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java @@ -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.player.EntityPlayer; @@ -10,11 +13,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; 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; + +import java.util.List; public class SigilOfHaste extends EnergyItems implements ArmourUpgrade { @@ -22,6 +22,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade private static Icon activeIcon; @SideOnly(Side.CLIENT) private static Icon passiveIcon; + public SigilOfHaste(int id) { super(id); @@ -41,8 +42,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -73,8 +73,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -87,8 +86,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade if (par1 == 1) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -115,7 +113,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade if (tag.getBoolean("isActive")) { par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200); + tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1)); //par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 2)); @@ -127,8 +125,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade { } } - } - else + } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); } @@ -144,7 +141,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHolding.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHolding.java index 398f957f..6dd03e27 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHolding.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHolding.java @@ -1,8 +1,10 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import java.util.ArrayList; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ModItems; +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.player.EntityPlayer; @@ -11,10 +13,9 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.Icon; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.ArrayList; +import java.util.List; public class SigilOfHolding extends EnergyItems { @@ -241,8 +242,7 @@ public class SigilOfHolding extends EnergyItems if (inv[i] != null) { filledSlots++; - } - else + } else { break; } @@ -258,8 +258,7 @@ public class SigilOfHolding extends EnergyItems if (getSelectedSlot(itemStack) + 1 < filledSlots) { itemTag.setInteger("selectedSlot", itemTag.getInteger("selectedSlot") + 1); - } - else + } else { itemTag.setInteger("selectedSlot", 0); } @@ -303,7 +302,7 @@ public class SigilOfHolding extends EnergyItems return false; } - for (Integer i: allowedSigils) + for (Integer i : allowedSigils) { if (i.intValue() == itemID) { @@ -335,16 +334,16 @@ public class SigilOfHolding extends EnergyItems public static void initiateSigilOfHolding() { - allowedSigils.add(new Integer(AlchemicalWizardry.waterSigil.itemID)); - allowedSigils.add(new Integer(AlchemicalWizardry.lavaSigil.itemID)); - allowedSigils.add(new Integer(AlchemicalWizardry.voidSigil.itemID)); - allowedSigils.add(new Integer(AlchemicalWizardry.airSigil.itemID)); - allowedSigils.add(new Integer(AlchemicalWizardry.sigilOfTheFastMiner.itemID)); - allowedSigils.add(new Integer(AlchemicalWizardry.divinationSigil.itemID)); - allowedSigils.add(new Integer(AlchemicalWizardry.sigilOfElementalAffinity.itemID)); - allowedSigils.add(new Integer(AlchemicalWizardry.growthSigil.itemID)); - allowedSigils.add(new Integer(AlchemicalWizardry.sigilOfHaste.itemID)); - allowedSigils.add(new Integer(AlchemicalWizardry.sigilOfWind.itemID)); + allowedSigils.add(new Integer(ModItems.waterSigil.itemID)); + allowedSigils.add(new Integer(ModItems.lavaSigil.itemID)); + allowedSigils.add(new Integer(ModItems.voidSigil.itemID)); + allowedSigils.add(new Integer(ModItems.airSigil.itemID)); + allowedSigils.add(new Integer(ModItems.sigilOfTheFastMiner.itemID)); + allowedSigils.add(new Integer(ModItems.divinationSigil.itemID)); + allowedSigils.add(new Integer(ModItems.sigilOfElementalAffinity.itemID)); + allowedSigils.add(new Integer(ModItems.growthSigil.itemID)); + allowedSigils.add(new Integer(ModItems.sigilOfHaste.itemID)); + allowedSigils.add(new Integer(ModItems.sigilOfWind.itemID)); } public ItemStack getCurrentItem(ItemStack sigilItemStack) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java index ff7c7c85..bc9cf1a0 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java @@ -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,11 +14,8 @@ 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; + +import java.util.List; public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade { @@ -44,8 +44,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -76,8 +75,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -90,8 +88,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade if (par1 == 1) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -135,14 +132,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 +154,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -169,13 +165,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 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 +193,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 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)); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java index 90263538..d8319927 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java @@ -1,7 +1,11 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.ArmourUpgrade; +import WayofTime.alchemicalWizardry.common.ModBlocks; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; @@ -10,11 +14,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; 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; + +import java.util.List; public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade { @@ -43,8 +44,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -75,8 +75,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -89,8 +88,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade if (par1 == 1) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -134,14 +132,13 @@ public class SigilOfTheBridge 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()); } @@ -157,7 +154,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { @@ -168,7 +165,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade { if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer) { - EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3Entity, this.getLPUsed(par1ItemStack)); + EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack)); this.setLPUsed(par1ItemStack, 0); } @@ -194,9 +191,9 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade verticalOffset--; } - int posX = (int)Math.round(par3Entity.posX - 0.5f); - int posY = (int)par3Entity.posY; - int posZ = (int)Math.round(par3Entity.posZ - 0.5f); + int posX = (int) Math.round(par3Entity.posX - 0.5f); + int posY = (int) par3Entity.posY; + int posZ = (int) Math.round(par3Entity.posZ - 0.5f); int incremented = 0; for (int ix = posX - range; ix <= posX + range; ix++) @@ -210,7 +207,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade if (par2World.isAirBlock(ix, posY + verticalOffset, iz)) { - par2World.setBlock(ix, posY + verticalOffset, iz, AlchemicalWizardry.spectralBlock.blockID, 0, 3); + par2World.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock.blockID, 0, 3); if (par2World.rand.nextInt(2) == 0) { @@ -273,9 +270,9 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade verticalOffset--; } - int posX = (int)Math.round(player.posX - 0.5f); - int posY = (int)player.posY; - int posZ = (int)Math.round(player.posZ - 0.5f); + int posX = (int) Math.round(player.posX - 0.5f); + int posY = (int) player.posY; + int posZ = (int) Math.round(player.posZ - 0.5f); //int incremented = 0; @@ -290,7 +287,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade if (world.isAirBlock(ix, posY + verticalOffset, iz)) { - world.setBlock(ix, posY + verticalOffset, iz, AlchemicalWizardry.spectralBlock.blockID, 0, 3); + world.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock.blockID, 0, 3); } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java index 5a3dc200..e033491d 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java @@ -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.player.EntityPlayer; @@ -11,11 +14,8 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; 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; + +import java.util.List; public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade { @@ -23,6 +23,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade private static Icon activeIcon; @SideOnly(Side.CLIENT) private static Icon passiveIcon; + public SigilOfTheFastMiner(int id) { super(id); @@ -42,8 +43,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -74,8 +74,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -88,8 +87,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade if (par1 == 1) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -116,7 +114,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade if (tag.getBoolean("isActive")) { par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200); + tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true)); //Test with added health boost @@ -127,8 +125,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade { } } - } - else + } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); } @@ -144,7 +141,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java index 72f0bc9c..e41f3bba 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java @@ -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.player.EntityPlayer; @@ -10,11 +13,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; 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; + +import java.util.List; public class SigilOfWind extends EnergyItems implements ArmourUpgrade { @@ -22,6 +22,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade private static Icon activeIcon; @SideOnly(Side.CLIENT) private static Icon passiveIcon; + public SigilOfWind(int id) { super(id); @@ -41,8 +42,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade if (par1ItemStack.stackTagCompound.getBoolean("isActive")) { par3List.add("Activated"); - } - else + } else { par3List.add("Deactivated"); } @@ -73,8 +73,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade if (tag.getBoolean("isActive")) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -87,8 +86,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade if (par1 == 1) { return this.activeIcon; - } - else + } else { return this.passiveIcon; } @@ -115,7 +113,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade if (tag.getBoolean("isActive")) { par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200); + tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1)); //par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 2)); @@ -127,8 +125,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade { } } - } - else + } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); } @@ -144,7 +141,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade return; } - EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; if (par1ItemStack.stackTagCompound == null) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/VoidSigil.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/VoidSigil.java index 34450434..62b33ea9 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/VoidSigil.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/VoidSigil.java @@ -1,7 +1,11 @@ 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.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.MaterialLiquid; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -13,17 +17,14 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.FillBucketEvent; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class VoidSigil extends ItemBucket implements ArmourUpgrade { private int isFull; private int energyUsed; + public VoidSigil(int id) { super(id, 0); @@ -71,7 +72,7 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade return this.energyUsed; } -// protected void damagePlayer(World world, EntityPlayer player, int damage) + // protected void damagePlayer(World world, EntityPlayer player, int damage) // { // if (world != null) // { @@ -133,8 +134,7 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade } return true; - } - else + } else { return true; } @@ -151,17 +151,16 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade } float f = 1.0F; - double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double)f; - double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double)f + 1.62D - (double)par3EntityPlayer.yOffset; - double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double)f; + double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double) f; + double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double) f + 1.62D - (double) par3EntityPlayer.yOffset; + double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double) f; boolean flag = this.isFull == 0; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, flag); if (movingobjectposition == null) { return par1ItemStack; - } - else + } else { FillBucketEvent event = new FillBucketEvent(par3EntityPlayer, par1ItemStack, par2World, movingobjectposition); @@ -197,8 +196,7 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { } - } - else + } else { return par1ItemStack; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/WaterSigil.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/WaterSigil.java index 27108e56..8f190959 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/WaterSigil.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/WaterSigil.java @@ -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.block.Block; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -13,15 +16,14 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; 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; + +import java.util.List; public class WaterSigil extends ItemBucket implements ArmourUpgrade { - /** field for checking if the bucket has been filled. */ + /** + * field for checking if the bucket has been filled. + */ private int isFull = Block.waterMoving.blockID; private int energyUsed; @@ -83,17 +85,16 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade } float f = 1.0F; - double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double)f; - double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double)f + 1.62D - (double)par3EntityPlayer.yOffset; - double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double)f; + double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double) f; + double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double) f + 1.62D - (double) par3EntityPlayer.yOffset; + double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double) f; boolean flag = this.isFull == 0; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, flag); if (movingobjectposition == null) { return par1ItemStack; - } - else + } else { if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) { @@ -109,8 +110,7 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade if (this.isFull == 0) { //Empty - } - else + } else { if (movingobjectposition.sideHit == 0) { @@ -154,8 +154,7 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { } - } - else + } else { return par1ItemStack; } @@ -175,16 +174,13 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade if (this.isFull <= 0) { return false; - } - else if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlockMaterial(par8, par9, par10).isSolid()) + } else if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlockMaterial(par8, par9, par10).isSolid()) { return false; - } - else if ((par1World.getBlockId(par8, par9, par10) == Block.waterMoving.blockID || par1World.getBlockId(par8, par9, par10) == Block.waterStill.blockID) && par1World.getBlockMetadata(par8, par9, par10) == 0) + } else if ((par1World.getBlockId(par8, par9, par10) == Block.waterMoving.blockID || par1World.getBlockId(par8, par9, par10) == Block.waterStill.blockID) && par1World.getBlockMetadata(par8, par9, par10) == 0) { return false; - } - else + } else { if (par1World.provider.isHellWorld) { @@ -192,10 +188,9 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade for (int l = 0; l < 8; ++l) { - par1World.spawnParticle("largesmoke", (double)par8 + Math.random(), (double)par9 + Math.random(), (double)par10 + Math.random(), 0.0D, 0.0D, 0.0D); + par1World.spawnParticle("largesmoke", (double) par8 + Math.random(), (double) par9 + Math.random(), (double) par10 + Math.random(), 0.0D, 0.0D, 0.0D); } - } - else + } else { par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusBase.java b/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusBase.java index 6847ca49..daf6abd9 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusBase.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusBase.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.thaumcraft; -import java.util.List; - 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.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -15,8 +15,8 @@ import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.wands.IWandFocus; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public abstract class FocusBase extends EnergyItems implements IWandFocus { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusBloodBlast.java b/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusBloodBlast.java index 5b633799..86eb8d2a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusBloodBlast.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusBloodBlast.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.items.thaumcraft; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; +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.player.EntityPlayer; import net.minecraft.item.Item; @@ -13,12 +12,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.wands.IWandFocus.WandFocusAnimation; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class FocusBloodBlast extends FocusBase { @@ -26,7 +25,7 @@ public class FocusBloodBlast extends FocusBase private final int maxCooldown = 7; - public static Map playerCooldown = new HashMap(); + public static Map playerCooldown = new HashMap(); public FocusBloodBlast(int par1) { @@ -120,33 +119,28 @@ public class FocusBloodBlast extends FocusBase if (!world.isRemote) { //par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage)); - world.spawnEntityInWorld(new EnergyBlastProjectile(world, par3EntityPlayer, (int)(5))); + world.spawnEntityInWorld(new EnergyBlastProjectile(world, par3EntityPlayer, (int) (5))); //this.setDelay(par1ItemStack, maxDelay); } } } - } - catch (NoSuchMethodException e1) + } catch (NoSuchMethodException e1) { // TODO Auto-generated catch block e1.printStackTrace(); - } - catch (SecurityException e1) + } catch (SecurityException e1) { // TODO Auto-generated catch block e1.printStackTrace(); - } - catch (IllegalAccessException e) + } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); - } - catch (IllegalArgumentException e) + } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); - } - catch (InvocationTargetException e) + } catch (InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusGravityWell.java b/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusGravityWell.java index 8a162150..8f3e7ec3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusGravityWell.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/thaumcraft/FocusGravityWell.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.items.thaumcraft; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +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.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; @@ -18,10 +16,12 @@ import net.minecraft.world.World; import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class FocusGravityWell extends FocusBase { @@ -29,7 +29,7 @@ public class FocusGravityWell extends FocusBase private final int maxCooldown = 1; - public static Map playerCooldown = new HashMap(); + public static Map playerCooldown = new HashMap(); public FocusGravityWell(int par1) { @@ -115,7 +115,7 @@ public class FocusGravityWell extends FocusBase { List entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX + vector.xCoord * distance - 0.5f, par3EntityPlayer.posY + vector.yCoord * distance - 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance - 0.5f, par3EntityPlayer.posX + vector.xCoord * distance + 0.5f, par3EntityPlayer.posY + vector.yCoord * distance + 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance + 0.5f).expand(1, 1, 1)); - for (Entity entity: entities) + for (Entity entity : entities) { if (entity.getEntityName() == par3EntityPlayer.username) { @@ -136,28 +136,23 @@ public class FocusGravityWell extends FocusBase } } } - } - catch (NoSuchMethodException e1) + } catch (NoSuchMethodException e1) { // TODO Auto-generated catch block e1.printStackTrace(); - } - catch (SecurityException e1) + } catch (SecurityException e1) { // TODO Auto-generated catch block e1.printStackTrace(); - } - catch (IllegalAccessException e) + } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); - } - catch (IllegalArgumentException e) + } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); - } - catch (InvocationTargetException e) + } catch (InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -203,7 +198,7 @@ public class FocusGravityWell extends FocusBase { List entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX + vector.xCoord * distance - 0.5f, par3EntityPlayer.posY + vector.yCoord * distance - 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance - 0.5f, par3EntityPlayer.posX + vector.xCoord * distance + 0.5f, par3EntityPlayer.posY + vector.yCoord * distance + 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance + 0.5f).expand(1, 1, 1)); - for (Entity entity: entities) + for (Entity entity : entities) { if (entity.getEntityName() == par3EntityPlayer.username) { @@ -218,28 +213,23 @@ public class FocusGravityWell extends FocusBase } } } - } - catch (NoSuchMethodException e1) + } catch (NoSuchMethodException e1) { // TODO Auto-generated catch block e1.printStackTrace(); - } - catch (SecurityException e1) + } catch (SecurityException e1) { // TODO Auto-generated catch block e1.printStackTrace(); - } - catch (IllegalAccessException e) + } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); - } - catch (IllegalArgumentException e) + } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); - } - catch (InvocationTargetException e) + } catch (InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java index 423815f8..6c93e00e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java @@ -1,15 +1,13 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; public class RenderConduit extends TileEntitySpecialRenderer { @@ -34,7 +32,7 @@ public class RenderConduit extends TileEntitySpecialRenderer GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); //GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F); //A reference to your Model file. Again, very important. - this.modelConduit.render((Entity)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection()); + this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection()); //Tell it to stop rendering for both the PushMatrix's GL11.glPopMatrix(); GL11.glPopMatrix(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java index 05bae590..b5a6bc6f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java @@ -1,5 +1,8 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; +import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -10,13 +13,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.ForgeDirection; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import cpw.mods.fml.client.FMLClientHandler; - public class RenderPedestal extends TileEntitySpecialRenderer { private ModelPedestal modelPedestal = new ModelPedestal(); @@ -34,6 +32,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer }; customRenderItem.setRenderManager(RenderManager.instance); } + @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { @@ -52,7 +51,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); //A reference to your Model file. Again, very important. - this.modelPedestal.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + this.modelPedestal.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); //Tell it to stop rendering for both the PushMatrix's GL11.glPopMatrix(); GL11.glPopMatrix(); @@ -61,7 +60,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer if (tileAltar.getStackInSlot(0) != null) { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - float rotationAngle = (float)(720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); + float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); EntityItem ghostEntityItem = new EntityItem(tileAltar.worldObj); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); @@ -71,8 +70,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) { GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); - } - else + } else { GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F); } @@ -117,8 +115,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer default: return 0.90F; } - } - else + } else { switch (customRenderItem.getMiniItemCount(itemStack)) { @@ -197,8 +194,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer return; } } - } - else + } else { switch (forgeDirection) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java index 35e3741f..9e11c1fc 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java @@ -1,5 +1,8 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; +import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -10,13 +13,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.ForgeDirection; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import cpw.mods.fml.client.FMLClientHandler; - public class RenderPlinth extends TileEntitySpecialRenderer { private ModelPlinth modelPlinth = new ModelPlinth(); @@ -34,6 +32,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer }; customRenderItem.setRenderManager(RenderManager.instance); } + @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { @@ -52,7 +51,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); //A reference to your Model file. Again, very important. - this.modelPlinth.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + this.modelPlinth.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); //Tell it to stop rendering for both the PushMatrix's GL11.glPopMatrix(); GL11.glPopMatrix(); @@ -70,8 +69,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) { GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); - } - else + } else { GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.1875f); } @@ -121,8 +119,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer default: return 0.90F * scaleFactor / 2; } - } - else + } else { switch (customRenderItem.getMiniItemCount(itemStack)) { @@ -201,8 +198,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer return; } } - } - else + } else { switch (forgeDirection) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java index f76e7e10..a179d09f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java @@ -1,5 +1,8 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -10,13 +13,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.ForgeDirection; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import cpw.mods.fml.client.FMLClientHandler; - public class RenderWritingTable extends TileEntitySpecialRenderer { private ModelWritingTable modelWritingTable = new ModelWritingTable(); @@ -39,6 +37,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer }; customRenderItem.setRenderManager(RenderManager.instance); } + @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { @@ -54,7 +53,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); //A reference to your Model file. Again, very important. - this.modelWritingTable.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + this.modelWritingTable.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); //Tell it to stop rendering for both the PushMatrix's GL11.glPopMatrix(); GL11.glPopMatrix(); @@ -66,7 +65,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer if (tileAltar.getStackInSlot(i) != null) { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(i)); - float rotationAngle = (float)(720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); + float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); EntityItem ghostEntityItem = new EntityItem(tileAltar.worldObj); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(i)); @@ -78,8 +77,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) { GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.7F, (float) d2 + 0.5F + displacementZ); - } - else + } else { GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.6F, (float) d2 + 0.5F + displacementZ); } @@ -126,8 +124,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer default: return 0.90F * scaleFactor; } - } - else + } else { switch (customRenderItem.getMiniItemCount(itemStack)) { @@ -278,8 +275,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer return; } } - } - else + } else { switch (forgeDirection) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java index b3b1d251..c1ba9231 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java @@ -1,5 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -8,12 +10,8 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; - public class TEAltarRenderer extends TileEntitySpecialRenderer { private ModelBloodAltar modelBloodAltar = new ModelBloodAltar(); @@ -35,8 +33,8 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { - modelBloodAltar.renderBloodAltar((TEAltar)tileEntity, d0, d1, d2); - modelBloodAltar.renderBloodLevel((TEAltar)tileEntity, d0, d1, d2); + modelBloodAltar.renderBloodAltar((TEAltar) tileEntity, d0, d1, d2); + modelBloodAltar.renderBloodLevel((TEAltar) tileEntity, d0, d1, d2); if (tileEntity instanceof TEAltar) { @@ -51,7 +49,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer if (tileAltar.getStackInSlot(0) != null) { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - float rotationAngle = (float)(720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); + float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); EntityItem ghostEntityItem = new EntityItem(tileAltar.worldObj); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); @@ -61,8 +59,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) { GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); - } - else + } else { GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F); } @@ -107,8 +104,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer default: return 0.90F; } - } - else + } else { switch (customRenderItem.getMiniItemCount(itemStack)) { @@ -187,8 +183,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer return; } } - } - else + } else { switch (forgeDirection) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java index 98806d3c..70cc34f7 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java @@ -1,13 +1,11 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.IItemRenderer; - -import org.lwjgl.opengl.GL11; - import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import org.lwjgl.opengl.GL11; public class TEAltarItemRenderer implements IItemRenderer { @@ -17,6 +15,7 @@ public class TEAltarItemRenderer implements IItemRenderer { modelBloodAltar = new ModelBloodAltar(); } + @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { @@ -67,7 +66,7 @@ public class TEAltarItemRenderer implements IItemRenderer GL11.glPushMatrix(); // Disable Lighting Calculations GL11.glDisable(GL11.GL_LIGHTING); - GL11.glTranslatef(x, y, z); + GL11.glTranslatef(x, y, z); GL11.glScalef(scale, scale, scale); GL11.glRotatef(180f, 0f, 1f, 0f); //FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/OBJTutorial/textures/models/TutBox.png"); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java index 475d96ab..9705879c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java @@ -1,15 +1,13 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; +import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; -import cpw.mods.fml.client.FMLClientHandler; - public class TEWritingTableItemRenderer implements IItemRenderer { private ModelWritingTable modelBloodAltar; @@ -18,6 +16,7 @@ public class TEWritingTableItemRenderer implements IItemRenderer { modelBloodAltar = new ModelWritingTable(); } + @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { @@ -68,14 +67,14 @@ public class TEWritingTableItemRenderer implements IItemRenderer GL11.glPushMatrix(); // Disable Lighting Calculations GL11.glDisable(GL11.GL_LIGHTING); - GL11.glTranslatef(x, y, z); + GL11.glTranslatef(x, y, z); GL11.glScalef(scale, scale, scale); GL11.glRotatef(180f, 0f, 1f, 0f); //FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/OBJTutorial/textures/models/TutBox.png"); ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/WritingTable.png"); //FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/alchemicalwizardry/textures/models/altar.png"); FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - modelBloodAltar.render((Entity)null, 0, 0, 0, 0, 0, 0); + modelBloodAltar.render((Entity) null, 0, 0, 0, 0, 0, 0); // Re-enable Lighting Calculations GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java index a684520c..b09c6ca7 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; public class RenderBileDemon extends RenderLiving { @@ -22,6 +22,6 @@ public class RenderBileDemon extends RenderLiving public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntityBileDemon)par1Entity); + return this.func_110832_a((EntityBileDemon) par1Entity); } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java index de61245b..6db35edd 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; public class RenderBoulderFist extends RenderLiving { @@ -22,6 +22,6 @@ public class RenderBoulderFist extends RenderLiving public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntityBoulderFist)par1Entity); + return this.func_110832_a((EntityBoulderFist) par1Entity); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java index 457392fb..485adc3a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java @@ -1,16 +1,11 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import WayofTime.alchemicalWizardry.common.EntityAirElemental; +import WayofTime.alchemicalWizardry.common.entity.mob.*; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.EntityAirElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; public class RenderElemental extends RenderLiving { @@ -63,6 +58,6 @@ public class RenderElemental extends RenderLiving public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntityElemental)par1Entity); + return this.func_110832_a((EntityElemental) par1Entity); } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java index b516da17..28a18eaa 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderFallenAngel extends RenderLiving @@ -25,6 +25,6 @@ public class RenderFallenAngel extends RenderLiving public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntityFallenAngel)par1Entity); + return this.func_110832_a((EntityFallenAngel) par1Entity); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java index 73e254da..e7dd7219 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; public class RenderIceDemon extends RenderLiving { @@ -22,6 +22,6 @@ public class RenderIceDemon extends RenderLiving public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntityIceDemon)par1Entity); + return this.func_110832_a((EntityIceDemon) par1Entity); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java index e197125a..4eeaa4d3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; public class RenderLowerGuardian extends RenderLiving { @@ -22,6 +22,6 @@ public class RenderLowerGuardian extends RenderLiving public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntityLowerGuardian)par1Entity); + return this.func_110832_a((EntityLowerGuardian) par1Entity); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java index 13826807..38868202 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; public class RenderShade extends RenderLiving { @@ -22,6 +22,6 @@ public class RenderShade extends RenderLiving public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntityShade)par1Entity); + return this.func_110832_a((EntityShade) par1Entity); } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java index 7434c9bc..16772df4 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; public class RenderSmallEarthGolem extends RenderLiving { @@ -22,6 +22,6 @@ public class RenderSmallEarthGolem extends RenderLiving public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntitySmallEarthGolem)par1Entity); + return this.func_110832_a((EntitySmallEarthGolem) par1Entity); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java index 54ad4746..826f7832 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; public class RenderWingedFireDemon extends RenderLiving { @@ -22,6 +22,6 @@ public class RenderWingedFireDemon extends RenderLiving public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntityWingedFireDemon)par1Entity); + return this.func_110832_a((EntityWingedFireDemon) par1Entity); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java index d3d2e868..e09db58e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBileDemon.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.model; -import org.lwjgl.opengl.GL11; - import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; +import org.lwjgl.opengl.GL11; public class ModelBileDemon extends ModelBase { @@ -158,11 +157,11 @@ public class ModelBileDemon extends ModelBase public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float)Math.PI); - this.head.rotateAngleY = f3 / (180F / (float)Math.PI); - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.3662F + (float)Math.PI) * 1.0F * f1; + this.head.rotateAngleX = f4 / (180F / (float) Math.PI); + this.head.rotateAngleY = f3 / (180F / (float) Math.PI); + this.rightArm.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; this.leftArm.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; - this.rightArmSpacer.rotateAngleX = MathHelper.cos(f * 0.3662F + (float)Math.PI) * 1.0F * f1; + this.rightArmSpacer.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; this.leftArmSpacer.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; this.leftBall.rotateAngleX = this.head.rotateAngleX; this.leftBall.rotateAngleY = this.head.rotateAngleY; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java index 306b94cc..33de85cc 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java @@ -1,15 +1,13 @@ package WayofTime.alchemicalWizardry.common.renderer.model; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.model.ModelBase; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.AdvancedModelLoader; import net.minecraftforge.client.model.IModelCustom; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.client.FMLClientHandler; - public class ModelBloodAltar extends ModelBase { private IModelCustom modelBloodAltar; @@ -37,7 +35,7 @@ public class ModelBloodAltar extends ModelBase // Push a blank matrix onto the stack GL11.glPushMatrix(); // Move the object into the correct position on the block (because the OBJ's origin is the center of the object) - GL11.glTranslatef((float)x + 0.5f, (float)y , (float)z + 0.5f); + GL11.glTranslatef((float) x + 0.5f, (float) y, (float) z + 0.5f); // Scale our object to about half-size in all directions (the OBJ file is a little large) GL11.glScalef(scale, scale, scale); // Bind the texture, so that OpenGL properly textures our block. @@ -57,7 +55,7 @@ public class ModelBloodAltar extends ModelBase GL11.glPushMatrix(); float level = altar.getFluidAmount(); // Move the object into the correct position on the block (because the OBJ's origin is the center of the object) - GL11.glTranslatef((float)x + 0.5f, (float)y + 0.6499f + 0.12f * (level / altar.getCapacity()), (float)z + 0.5f); + GL11.glTranslatef((float) x + 0.5f, (float) y + 0.6499f + 0.12f * (level / altar.getCapacity()), (float) z + 0.5f); // Scale our object to about half-size in all directions (the OBJ file is a little large) GL11.glScalef(scale, scale, scale); // Bind the texture, so that OpenGL properly textures our block. diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java index 2d2a56ba..a2cebd46 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelBoulderFist.java @@ -48,13 +48,13 @@ public class ModelBoulderFist extends ModelBase leftLeg1.setRotationPoint(5F, 11F, 7F); leftLeg1.setTextureSize(64, 64); leftLeg1.mirror = true; - setRotation(leftLeg1, -((float)Math.PI / 4F), 0F, 0F); + setRotation(leftLeg1, -((float) Math.PI / 4F), 0F, 0F); leftLeg2 = new ModelRenderer(this, 1, 25); leftLeg2.addBox(0F, 5F, -1F, 4, 2, 12); leftLeg2.setRotationPoint(5F, 11F, 7F); leftLeg2.setTextureSize(64, 64); leftLeg2.mirror = true; - setRotation(leftLeg2, -((float)Math.PI / 4F), 0F, 0F); + setRotation(leftLeg2, -((float) Math.PI / 4F), 0F, 0F); leftFoot = new ModelRenderer(this, 22, 25); leftFoot.addBox(0F, 11F, -1F, 4, 2, 5); leftFoot.setRotationPoint(5F, 11F, 7F); @@ -83,7 +83,7 @@ public class ModelBoulderFist extends ModelBase rightLeg1.setRotationPoint(-5F, 11F, 7F); rightLeg1.setTextureSize(64, 64); rightLeg1.mirror = true; - setRotation(rightLeg1, -((float)Math.PI / 4F), 0F, 0F); + setRotation(rightLeg1, -((float) Math.PI / 4F), 0F, 0F); rightLeg1.mirror = false; rightLeg2 = new ModelRenderer(this, 1, 25); rightLeg2.mirror = true; @@ -91,7 +91,7 @@ public class ModelBoulderFist extends ModelBase rightLeg2.setRotationPoint(-5F, 11F, 7F); rightLeg2.setTextureSize(64, 64); rightLeg2.mirror = true; - setRotation(rightLeg2, -((float)Math.PI / 4F), 0F, 0F); + setRotation(rightLeg2, -((float) Math.PI / 4F), 0F, 0F); rightLeg2.mirror = false; rightFoot = new ModelRenderer(this, 22, 25); rightFoot.mirror = true; @@ -137,15 +137,15 @@ public class ModelBoulderFist extends ModelBase public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float)Math.PI); - this.head.rotateAngleY = f3 / (180F / (float)Math.PI); + this.head.rotateAngleX = f4 / (180F / (float) Math.PI); + this.head.rotateAngleY = f3 / (180F / (float) Math.PI); this.leftFoot.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.8F * f1; - this.rightFoot.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 0.8F * f1; - this.leftLeg1.rotateAngleX = leftFoot.rotateAngleX - ((float)Math.PI / 4F); - this.rightLeg1.rotateAngleX = rightFoot.rotateAngleX - ((float)Math.PI / 4F); - this.leftLeg2.rotateAngleX = leftFoot.rotateAngleX - ((float)Math.PI / 4F); - this.rightLeg2.rotateAngleX = rightFoot.rotateAngleX - ((float)Math.PI / 4F); - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 0.9f * f1; + this.rightFoot.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 0.8F * f1; + this.leftLeg1.rotateAngleX = leftFoot.rotateAngleX - ((float) Math.PI / 4F); + this.rightLeg1.rotateAngleX = rightFoot.rotateAngleX - ((float) Math.PI / 4F); + this.leftLeg2.rotateAngleX = leftFoot.rotateAngleX - ((float) Math.PI / 4F); + this.rightLeg2.rotateAngleX = rightFoot.rotateAngleX - ((float) Math.PI / 4F); + this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 0.9f * f1; this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.9f * f1; this.leftFist.rotateAngleX = leftArm.rotateAngleX; this.rightFist.rotateAngleX = rightArm.rotateAngleX; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java index cff9824f..bff5c62b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java @@ -13,7 +13,7 @@ import net.minecraftforge.common.ForgeDirection; public class ModelConduit extends ModelBase { -//fields + //fields ModelRenderer curvedInput; ModelRenderer curvedOutput; ModelRenderer straightBar1; @@ -168,30 +168,30 @@ public class ModelConduit extends ModelBase case EAST: xInputRot = 0.0f; - yInputRot = (float)(0.5f * Math.PI); + yInputRot = (float) (0.5f * Math.PI); zInputRot = 0.0f; break; case SOUTH: xInputRot = 0.0f; - yInputRot = (float)(1.0f * Math.PI); + yInputRot = (float) (1.0f * Math.PI); zInputRot = 0.0f; break; case WEST: xInputRot = 0.0f; - yInputRot = (float)(-0.5f * Math.PI); + yInputRot = (float) (-0.5f * Math.PI); zInputRot = 0.0f; break; case UP: - xInputRot = (float)(-0.5f * Math.PI); + xInputRot = (float) (-0.5f * Math.PI); yInputRot = 0.0f; zInputRot = 0.0f; break; case DOWN: - xInputRot = (float)(0.5f * Math.PI); + xInputRot = (float) (0.5f * Math.PI); yInputRot = 0.0f; zInputRot = 0.0f; break; @@ -204,19 +204,19 @@ public class ModelConduit extends ModelBase { case NORTH: xOutputRot = 0.0f; - yOutputRot = (float)(0.5f * Math.PI); + yOutputRot = (float) (0.5f * Math.PI); zOutputRot = 0.0f; break; case EAST: xOutputRot = 0.0f; - yOutputRot = (float)(1.0f * Math.PI); + yOutputRot = (float) (1.0f * Math.PI); zOutputRot = 0.0f; break; case SOUTH: xOutputRot = 0.0f; - yOutputRot = (float)(-0.5f * Math.PI); + yOutputRot = (float) (-0.5f * Math.PI); zOutputRot = 0.0f; break; @@ -229,13 +229,13 @@ public class ModelConduit extends ModelBase case UP: xOutputRot = 0.0f; yOutputRot = 0.0f; - zOutputRot = (float)(-0.5f * Math.PI); + zOutputRot = (float) (-0.5f * Math.PI); break; case DOWN: xOutputRot = 0.0f; yOutputRot = 0.0f; - zOutputRot = (float)(0.5f * Math.PI); + zOutputRot = (float) (0.5f * Math.PI); break; default: diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java index e9d0046a..25cb2814 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java @@ -29,19 +29,19 @@ public class ModelElemental extends ModelBase Shape2.setRotationPoint(0F, 14F, 0F); Shape2.setTextureSize(64, 32); Shape2.mirror = true; - setRotation(Shape2, ((float)Math.PI / 4F), ((float)Math.PI / 4F), 0F); + setRotation(Shape2, ((float) Math.PI / 4F), ((float) Math.PI / 4F), 0F); Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(-4F, -4F, -4F, 8, 8, 8); Shape1.setRotationPoint(0F, 14F, 0F); Shape1.setTextureSize(64, 32); Shape1.mirror = true; - setRotation(Shape1, 0F, ((float)Math.PI / 4F), ((float)Math.PI / 4F)); + setRotation(Shape1, 0F, ((float) Math.PI / 4F), ((float) Math.PI / 4F)); Shape3 = new ModelRenderer(this, 0, 0); Shape3.addBox(-4F, -4F, -4F, 8, 8, 8); Shape3.setRotationPoint(0F, 14F, 0F); Shape3.setTextureSize(64, 32); Shape3.mirror = true; - setRotation(Shape3, ((float)Math.PI / 4F), 0F, ((float)Math.PI / 4F)); + setRotation(Shape3, ((float) Math.PI / 4F), 0F, ((float) Math.PI / 4F)); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java index 58314651..aacef80d 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelFallenAngel.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.renderer.model; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; public class ModelFallenAngel extends ModelBase { @@ -103,13 +101,13 @@ public class ModelFallenAngel extends ModelBase public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float)Math.PI); - this.head.rotateAngleY = f3 / (180F / (float)Math.PI); + this.head.rotateAngleX = f4 / (180F / (float) Math.PI); + this.head.rotateAngleY = f3 / (180F / (float) Math.PI); this.leftleg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightleg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; - this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; + this.rightleg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; + this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; this.leftarm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.rightWing.rotateAngleY = MathHelper.cos(0.1662F); - this.leftWing.rotateAngleY = MathHelper.cos(0.1662F + (float)Math.PI); + this.leftWing.rotateAngleY = MathHelper.cos(0.1662F + (float) Math.PI); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java index da51dbf9..9c6d3c32 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelIceDemon.java @@ -175,11 +175,11 @@ public class ModelIceDemon extends ModelBase public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float)Math.PI); - this.head.rotateAngleY = f3 / (180F / (float)Math.PI); + this.head.rotateAngleX = f4 / (180F / (float) Math.PI); + this.head.rotateAngleY = f3 / (180F / (float) Math.PI); this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; + this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; + this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.leftHorn.rotateAngleX = head.rotateAngleX + 0.4363323F; this.leftHorn.rotateAngleY = head.rotateAngleY; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java index eb4fa09d..61d7b85d 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelLowerGuardian.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.renderer.model; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.MathHelper; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; public class ModelLowerGuardian extends ModelBase { @@ -164,13 +164,13 @@ public class ModelLowerGuardian extends ModelBase public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4) { - EntityLowerGuardian entityLowerGuardian = (EntityLowerGuardian)par1EntityLivingBase; + EntityLowerGuardian entityLowerGuardian = (EntityLowerGuardian) par1EntityLivingBase; int i = entityLowerGuardian.getAttackTimer(); if (i > 0) { - this.rightLeg.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); - this.rightFoot.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); + this.rightLeg.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float) i - par4, 10.0F); + this.rightFoot.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float) i - par4, 10.0F); //this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); } } @@ -183,13 +183,13 @@ public class ModelLowerGuardian extends ModelBase public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.Head.rotateAngleX = f4 / (180F / (float)Math.PI); - this.Head.rotateAngleY = f3 / (180F / (float)Math.PI); + this.Head.rotateAngleX = f4 / (180F / (float) Math.PI); + this.Head.rotateAngleY = f3 / (180F / (float) Math.PI); this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; - this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.3662F + (float)Math.PI) * 1.0F * f1; + this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; this.leftFoot.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; - this.rightFoot.rotateAngleX = MathHelper.cos(f * 0.3662F + (float)Math.PI) * 1.0F * f1; - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.3662F + (float)Math.PI) * 1.0F * f1; + this.rightFoot.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; + this.rightArm.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1; this.leftArm.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1; this.hornAppendage1.rotateAngleX = this.Head.rotateAngleX; this.hornAppendage1.rotateAngleY = this.Head.rotateAngleY; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java index 5fb486c1..26a94989 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelMeteor.java @@ -6,7 +6,7 @@ import net.minecraft.entity.Entity; public class ModelMeteor extends ModelBase { -//fields + //fields ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java index 9e403dcd..8a7f2632 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelShade.java @@ -80,7 +80,7 @@ public class ModelShade extends ModelBase public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float)Math.PI); - this.head.rotateAngleY = f3 / (180F / (float)Math.PI); + this.head.rotateAngleX = f4 / (180F / (float) Math.PI); + this.head.rotateAngleY = f3 / (180F / (float) Math.PI); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java index ccde30d7..45a232de 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelSmallEarthGolem.java @@ -117,11 +117,11 @@ public class ModelSmallEarthGolem extends ModelBase public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float)Math.PI); - this.head.rotateAngleY = f3 / (180F / (float)Math.PI); + this.head.rotateAngleX = f4 / (180F / (float) Math.PI); + this.head.rotateAngleY = f3 / (180F / (float) Math.PI); this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; + this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; + this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; } } \ No newline at end of file diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java index 37661ffe..07164ffd 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelWingedFireDemon.java @@ -183,8 +183,8 @@ public class ModelWingedFireDemon extends ModelBase public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.head.rotateAngleX = f4 / (180F / (float)Math.PI); - this.head.rotateAngleY = f3 / (180F / (float)Math.PI); + this.head.rotateAngleX = f4 / (180F / (float) Math.PI); + this.head.rotateAngleY = f3 / (180F / (float) Math.PI); this.leftHorn1.rotateAngleX = head.rotateAngleX; this.leftHorn1.rotateAngleY = head.rotateAngleY; this.leftHorn2.rotateAngleX = head.rotateAngleX; @@ -194,8 +194,8 @@ public class ModelWingedFireDemon extends ModelBase this.rightHorn2.rotateAngleX = head.rotateAngleX; this.rightHorn2.rotateAngleY = head.rotateAngleY; this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; - this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.0F * f1; - this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.0F * f1; + this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1; + this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1; this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.leftShoulder.rotateAngleX = this.leftArm.rotateAngleX; this.rightShoulder.rotateAngleX = this.rightArm.rotateAngleX; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java index 89f2d36a..15dede34 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java @@ -48,7 +48,7 @@ public class ModelWritingTable extends ModelBase appendage2.setRotationPoint(0F, 10F, 0F); appendage2.setTextureSize(64, 32); appendage2.mirror = true; - setRotation(appendage2, 0F, ((float)Math.PI * 2F / 5F), 0F); + setRotation(appendage2, 0F, ((float) Math.PI * 2F / 5F), 0F); appendage3 = new ModelRenderer(this, 48, 0); appendage3.addBox(1F, 0F, 0F, 7, 11, 0); appendage3.setRotationPoint(0F, 10F, 0F); @@ -66,7 +66,7 @@ public class ModelWritingTable extends ModelBase appendage5.setRotationPoint(0F, 10F, 0F); appendage5.setTextureSize(64, 32); appendage5.mirror = true; - setRotation(appendage5, 0F, -((float)Math.PI * 2F / 5F), 0F); + setRotation(appendage5, 0F, -((float) Math.PI * 2F / 5F), 0F); outputPad = new ModelRenderer(this, 0, 20); outputPad.addBox(0F, 0F, 0F, 4, 1, 4); outputPad.setRotationPoint(-2F, 9F, -2F); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java index 816401cc..57df9912 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java @@ -1,15 +1,13 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; - import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile; - public class RenderEnergyBazookaMainProjectile extends Render { public ModelBase model = new ModelEnergyBazookaMainProjectile(); @@ -20,13 +18,13 @@ public class RenderEnergyBazookaMainProjectile extends Render public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { GL11.glPushMatrix(); - GL11.glTranslatef((float)d0, (float)d1, (float)d2); + GL11.glTranslatef((float) d0, (float) d1, (float) d2); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(scale, scale, scale); this.bindTexture(this.getEntityTexture(entity)); GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F); GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f); - model.render(entity, 0, (float)d0, (float)d1, (float) d2, f, f1); + model.render(entity, 0, (float) d0, (float) d1, (float) d2, f, f1); //GL11.glRotatef(entity.getRotationYawHead(), 0.0F, 1.0F, 0.0F); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java index 93b66598..787ec4ad 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java @@ -1,32 +1,22 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; +import WayofTime.alchemicalWizardry.common.entity.projectile.*; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; - import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class RenderEnergyBlastProjectile extends Render { public void doRenderEnergyBlastProjectile(EnergyBlastProjectile entityShot, double par2, double par4, double par6, float par8, float par9) { GL11.glPushMatrix(); - GL11.glTranslatef((float)par2, (float)par4, (float)par6); + GL11.glTranslatef((float) par2, (float) par4, (float) par6); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(0.1F, 0.1F, 0.1F); this.bindTexture(this.getEntityTexture(entityShot)); @@ -49,7 +39,7 @@ public class RenderEnergyBlastProjectile extends Render { if (par1Entity instanceof EnergyBlastProjectile) { - this.doRenderEnergyBlastProjectile((EnergyBlastProjectile)par1Entity, par2, par4, par6, par8, par9); + this.doRenderEnergyBlastProjectile((EnergyBlastProjectile) par1Entity, par2, par4, par6, par8, par9); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java index 6184e9c4..cda739fe 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java @@ -1,15 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.util.ResourceLocation; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; @SideOnly(Side.CLIENT) public class RenderFireProjectile diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java index 0c119748..c39dcb11 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java @@ -1,15 +1,13 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; - import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor; - public class RenderMeteor extends Render { public ModelBase model = new ModelMeteor(); @@ -20,13 +18,13 @@ public class RenderMeteor extends Render public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { GL11.glPushMatrix(); - GL11.glTranslatef((float)d0, (float)d1, (float)d2); + GL11.glTranslatef((float) d0, (float) d1, (float) d2); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(scale, scale, scale); this.bindTexture(this.getEntityTexture(entity)); GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F); GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f); - model.render(entity, 0, (float)d0, (float)d1, (float) d2, f, f1); + model.render(entity, 0, (float) d0, (float) d1, (float) d2, f, f1); //GL11.glRotatef(entity.getRotationYawHead(), 0.0F, 1.0F, 0.0F); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffect.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffect.java index 387f836a..4652c83c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffect.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffect.java @@ -1,13 +1,6 @@ package WayofTime.alchemicalWizardry.common.rituals; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.server.MinecraftServer; -import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; public abstract class RitualEffect { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java index 1def311f..ea5e04fd 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java @@ -1,20 +1,17 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; + +import java.util.Iterator; +import java.util.List; public class RitualEffectAnimalGrowth extends RitualEffect { @@ -23,7 +20,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -43,7 +40,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect } int d0 = 2; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y + 1, (double)z, (double)(x + 1), (double)(y + 3), (double)(z + 1)).expand(d0, 0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 3), (double) (z + 1)).expand(d0, 0, d0); List list = world.getEntitiesWithinAABB(EntityAgeable.class, axisalignedbb); Iterator iterator1 = list.iterator(); EntityAgeable entity; @@ -52,7 +49,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect while (iterator1.hasNext()) { - entity = (EntityAgeable)iterator1.next(); + entity = (EntityAgeable) iterator1.next(); entityCount++; } @@ -66,15 +63,14 @@ public class RitualEffectAnimalGrowth extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { Iterator iterator2 = list.iterator(); entityCount = 0; while (iterator2.hasNext()) { - entity = (EntityAgeable)iterator2.next(); + entity = (EntityAgeable) iterator2.next(); if (entity.getGrowingAge() < 0) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java index 5b7a0c7c..da774558 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.ModBlocks; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; import net.minecraft.block.Block; @@ -25,7 +25,7 @@ public class RitualEffectBiomeChanger extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -64,8 +64,7 @@ public class RitualEffectBiomeChanger extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { boolean[][] boolList = new boolean[range * 2 + 1][range * 2 + 1]; @@ -95,7 +94,7 @@ public class RitualEffectBiomeChanger extends RitualEffect int id = world.getBlockId(x - range + i - 1, y + 1, z - range + j); Block block = Block.blocksList[id]; - if (!AlchemicalWizardry.largeBloodStoneBrick.equals(block) && !AlchemicalWizardry.bloodStoneBrick.equals(block)) + if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) { boolList[i - 1][j] = true; isReady = false; @@ -107,7 +106,7 @@ public class RitualEffectBiomeChanger extends RitualEffect int id = world.getBlockId(x - range + i, y + 1, z - range + j - 1); Block block = Block.blocksList[id]; - if (!AlchemicalWizardry.largeBloodStoneBrick.equals(block) && !AlchemicalWizardry.bloodStoneBrick.equals(block)) + if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) { boolList[i][j - 1] = true; isReady = false; @@ -119,7 +118,7 @@ public class RitualEffectBiomeChanger extends RitualEffect int id = world.getBlockId(x - range + i + 1, y + 1, z - range + j); Block block = Block.blocksList[id]; - if (!AlchemicalWizardry.largeBloodStoneBrick.equals(block) && !AlchemicalWizardry.bloodStoneBrick.equals(block)) + if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) { boolList[i + 1][j] = true; isReady = false; @@ -131,7 +130,7 @@ public class RitualEffectBiomeChanger extends RitualEffect int id = world.getBlockId(x - range + i, y + 1, z - range + j + 1); Block block = Block.blocksList[id]; - if (!AlchemicalWizardry.largeBloodStoneBrick.equals(block) && !AlchemicalWizardry.bloodStoneBrick.equals(block)) + if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) { boolList[i][j + 1] = true; isReady = false; @@ -163,7 +162,7 @@ public class RitualEffectBiomeChanger extends RitualEffect continue; } - TEPlinth tilePlinth = (TEPlinth)tileEntity; + TEPlinth tilePlinth = (TEPlinth) tileEntity; ItemStack itemStack = tilePlinth.getStackInSlot(0); if (itemStack != null) @@ -178,64 +177,52 @@ public class RitualEffectBiomeChanger extends RitualEffect { humidity -= 0.1f; isItemConsumed = true; - } - else if (item.itemID == (Block.blockLapis.blockID)) + } else if (item.itemID == (Block.blockLapis.blockID)) { humidity += 0.4f; isItemConsumed = true; - } - else if (item.itemID == (Block.sand.blockID)) + } else if (item.itemID == (Block.sand.blockID)) { humidity -= 0.1f; isItemConsumed = true; - } - else if (item.itemID == (Block.sandStone.blockID)) + } else if (item.itemID == (Block.sandStone.blockID)) { humidity -= 0.2f; isItemConsumed = true; - } - else if (item.itemID == (Block.netherrack.blockID)) + } else if (item.itemID == (Block.netherrack.blockID)) { humidity -= 0.4f; isItemConsumed = true; - } - else if (item.itemID == (Block.coalBlock.blockID)) + } else if (item.itemID == (Block.coalBlock.blockID)) { temperature += 0.2f; isItemConsumed = true; - } - else if (item.itemID == (Block.ice.blockID)) + } else if (item.itemID == (Block.ice.blockID)) { temperature -= 0.4f; isItemConsumed = true; - } - else if (item.itemID == (Block.blockSnow.blockID)) + } else if (item.itemID == (Block.blockSnow.blockID)) { temperature -= 0.2f; isItemConsumed = true; } - } - else if (item.equals(Item.dyePowder) && itemStack.getItemDamage() == 4) + } else if (item.equals(Item.dyePowder) && itemStack.getItemDamage() == 4) { humidity += 0.1f; isItemConsumed = true; - } - else if (item.equals(Item.bucketLava)) + } else if (item.equals(Item.bucketLava)) { temperature += 0.4f; isItemConsumed = true; - } - else if (item.equals(Item.bucketWater)) + } else if (item.equals(Item.bucketWater)) { humidity += 0.2f; isItemConsumed = true; - } - else if (item.equals(Item.coal)) + } else if (item.equals(Item.coal)) { temperature += 0.1f; isItemConsumed = true; - } - else if (item.equals(Item.snowball)) + } else if (item.equals(Item.snowball)) { temperature -= 0.1f; isItemConsumed = true; @@ -304,7 +291,7 @@ public class RitualEffectBiomeChanger extends RitualEffect moduZ = moduZ + 16; } - byteArray[moduZ * 16 + moduX] = (byte)biomeID; + byteArray[moduZ * 16 + moduX] = (byte) biomeID; chunk.setBiomeArray(byteArray); //world.setBlock(x-range+i, y+1, z-range+j, Block.blockClay.blockID); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java index 6e1774e5..30b226e2 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; @@ -13,7 +11,9 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; + +import java.util.Iterator; +import java.util.List; public class RitualEffectContainment extends RitualEffect { @@ -22,7 +22,7 @@ public class RitualEffectContainment extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -46,11 +46,10 @@ public class RitualEffectContainment extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { int d0 = 5; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y, (double)z, (double)(x + 1), (double)(y + 1), (double)(z + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); EntityLivingBase livingEntity; @@ -58,7 +57,7 @@ public class RitualEffectContainment extends RitualEffect while (iterator.hasNext()) { - livingEntity = (EntityLivingBase)iterator.next(); + livingEntity = (EntityLivingBase) iterator.next(); if (livingEntity instanceof EntityPlayer) { @@ -78,7 +77,7 @@ public class RitualEffectContainment extends RitualEffect if (world.rand.nextInt(10) == 0) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(livingEntity.posX, livingEntity.posY, livingEntity.posZ, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(livingEntity.posX, livingEntity.posY, livingEntity.posZ, (short) 1)); } livingEntity.fallDistance = 0; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java index 968fc840..92f8d7d2 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java @@ -1,13 +1,9 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.ModBlocks; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -17,8 +13,8 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.ArrayList; public class RitualEffectCrushing extends RitualEffect { @@ -27,7 +23,7 @@ public class RitualEffectCrushing extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -51,9 +47,8 @@ public class RitualEffectCrushing extends RitualEffect if (tile instanceof IInventory) { - tileEntity = (IInventory)tile; - } - else + tileEntity = (IInventory) tile; + } else { return; } @@ -73,8 +68,7 @@ public class RitualEffectCrushing extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { //boolean flag = false; for (int j = -3; j < 0; j++) @@ -89,7 +83,7 @@ public class RitualEffectCrushing extends RitualEffect if (block != null) { - if ((block.equals(AlchemicalWizardry.ritualStone) || block.equals(AlchemicalWizardry.blockMasterStone))) + if ((block.equals(ModBlocks.ritualStone) || block.equals(ModBlocks.blockMasterStone))) { continue; } @@ -114,8 +108,7 @@ public class RitualEffectCrushing extends RitualEffect { tileEntity.setInventorySlotContents(n, copyStack); copyStack.stackSize = 0; - } - else + } else { if (itemStack.getItem().equals(copyStack.getItem())) { @@ -128,8 +121,7 @@ public class RitualEffectCrushing extends RitualEffect copyStack.stackSize = 0; itemStack.stackSize = itemSize + copySize; tileEntity.setInventorySlotContents(n, itemStack); - } - else + } else { copyStack.stackSize = itemSize + copySize - maxSize; itemStack.stackSize = maxSize; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java index c5c3796e..1199727c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; @@ -16,6 +11,8 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import java.util.List; + public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fall damage in the area of effect { @Override @@ -23,7 +20,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -67,8 +64,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { for (EntityLivingBase entity : entities) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java index 49e3957f..cdb5db03 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; @@ -12,9 +9,11 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import java.util.Iterator; +import java.util.List; + public class RitualEffectFeatheredKnife extends RitualEffect { public final int timeDelay = 20; @@ -25,7 +24,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -59,7 +58,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect { if (world.getBlockTileEntity(x + i, y + k, z + j) instanceof TEAltar) { - tileAltar = (TEAltar)world.getBlockTileEntity(x + i, y + k, z + j); + tileAltar = (TEAltar) world.getBlockTileEntity(x + i, y + k, z + j); testFlag = true; } } @@ -74,7 +73,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect //tileAltar = (TEAltar)world.getBlockTileEntity(x,y-1,z); int d0 = 15; int vertRange = 20; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y, (double)z, (double)(x + 1), (double)(y + 1), (double)(z + 1)).expand(d0, vertRange, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, vertRange, d0); List list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb); Iterator iterator1 = list.iterator(); EntityPlayer entity; @@ -83,7 +82,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect while (iterator1.hasNext()) { - entity = (EntityPlayer)iterator1.next(); + entity = (EntityPlayer) iterator1.next(); if (entity.getClass().equals(EntityPlayerMP.class) || entity.getClass().equals(EntityPlayer.class)) { @@ -101,15 +100,14 @@ public class RitualEffectFeatheredKnife extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { Iterator iterator2 = list.iterator(); entityCount = 0; while (iterator2.hasNext()) { - entity = (EntityPlayer)iterator2.next(); + entity = (EntityPlayer) iterator2.next(); //entity = (EntityPlayer)iterator1.next(); if (entity.getClass().equals(EntityPlayerMP.class) || entity.getClass().equals(EntityPlayer.class)) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java index 8cfa0c46..b3c56d4b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java @@ -1,12 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.List; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; @@ -14,6 +10,8 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import java.util.List; + public class RitualEffectFlight extends RitualEffect { @Override @@ -21,7 +19,7 @@ public class RitualEffectFlight extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -64,8 +62,7 @@ public class RitualEffectFlight extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { for (EntityPlayer entity : entities) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java index f45677a4..3de43a5f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.rituals; import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; @@ -10,7 +11,6 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; -import cpw.mods.fml.common.network.PacketDispatcher; public class RitualEffectGrowth extends RitualEffect { @@ -19,7 +19,7 @@ public class RitualEffectGrowth extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -43,8 +43,7 @@ public class RitualEffectGrowth extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { if (world.getWorldTime() % 20 != 0) { @@ -63,7 +62,7 @@ public class RitualEffectGrowth extends RitualEffect if (block instanceof IPlantable) { { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(x + i, y + 2, z + j, (short)3)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(x + i, y + 2, z + j, (short) 3)); block.updateTick(world, x + i, y + 2, z + j, world.rand); flag = true; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java index 3e2d6250..51aef53e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java @@ -1,21 +1,17 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; + +import java.util.Iterator; +import java.util.List; public class RitualEffectHealing extends RitualEffect { @@ -27,7 +23,7 @@ public class RitualEffectHealing extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -53,7 +49,7 @@ public class RitualEffectHealing extends RitualEffect //tileAltar = (TEAltar)world.getBlockTileEntity(x,y-1,z); int d0 = 10; int vertRange = 10; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y, (double)z, (double)(x + 1), (double)(y + 1), (double)(z + 1)).expand(d0, vertRange, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, vertRange, d0); List list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator1 = list.iterator(); EntityLivingBase entity; @@ -62,13 +58,12 @@ public class RitualEffectHealing extends RitualEffect while (iterator1.hasNext()) { - entity = (EntityLivingBase)iterator1.next(); + entity = (EntityLivingBase) iterator1.next(); if (entity instanceof EntityPlayer) { entityCount += 10; - } - else + } else { entityCount++; } @@ -84,15 +79,14 @@ public class RitualEffectHealing extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { Iterator iterator2 = list.iterator(); entityCount = 0; while (iterator2.hasNext()) { - entity = (EntityLivingBase)iterator2.next(); + entity = (EntityLivingBase) iterator2.next(); if (entity.getHealth() + 0.1f < entity.getMaxHealth()) { @@ -105,8 +99,7 @@ public class RitualEffectHealing extends RitualEffect if (entity instanceof EntityPlayer) { entityCount += 10; - } - else + } else { entityCount++; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java index d9e31078..5c9d5f32 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import net.minecraft.entity.EntityLivingBase; @@ -13,6 +10,9 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import java.util.Iterator; +import java.util.List; + public class RitualEffectInterdiction extends RitualEffect { @Override @@ -20,7 +20,7 @@ public class RitualEffectInterdiction extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -44,12 +44,11 @@ public class RitualEffectInterdiction extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { int d0 = 5; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y, (double)z, (double)(x + 1), (double)(y + 1), (double)(z + 1)).expand(d0, d0, d0); - axisalignedbb.maxY = Math.min((double)world.getHeight(), (double)(y + 1 + d0)); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, d0, d0); + axisalignedbb.maxY = Math.min((double) world.getHeight(), (double) (y + 1 + d0)); List list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); EntityLivingBase entityplayer; @@ -57,7 +56,7 @@ public class RitualEffectInterdiction extends RitualEffect while (iterator.hasNext()) { - entityplayer = (EntityLivingBase)iterator.next(); + entityplayer = (EntityLivingBase) iterator.next(); if (!(entityplayer.getEntityName().equals(owner))) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java index 10d34a58..8b0abd55 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.PacketHandler; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.common.network.Player; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; @@ -13,8 +12,9 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; + +import java.util.Iterator; +import java.util.List; public class RitualEffectJumping extends RitualEffect { @@ -23,7 +23,7 @@ public class RitualEffectJumping extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -47,11 +47,10 @@ public class RitualEffectJumping extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { int d0 = 0; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y + 1, (double)z, (double)(x + 1), (double)(y + 2), (double)(z + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); EntityLivingBase entityplayer; @@ -59,17 +58,16 @@ public class RitualEffectJumping extends RitualEffect while (iterator.hasNext()) { - entityplayer = (EntityLivingBase)iterator.next(); + entityplayer = (EntityLivingBase) iterator.next(); if (entityplayer instanceof EntityPlayer) { - PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(entityplayer.motionX, 1.5, entityplayer.motionZ), (Player)entityplayer); + PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(entityplayer.motionX, 1.5, entityplayer.motionZ), (Player) entityplayer); entityplayer.motionY = 1.5; entityplayer.fallDistance = 0; flag = true; - } - else - //if (!(entityplayer.getEntityName().equals(owner))) + } else + //if (!(entityplayer.getEntityName().equals(owner))) { // double xDif = entityplayer.posX - xCoord; // double yDif = entityplayer.posY - (yCoord + 1); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java index 55e03a02..1cb38c9f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java @@ -3,13 +3,13 @@ package WayofTime.alchemicalWizardry.common.rituals; import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; public class RitualEffectLava extends RitualEffect { @@ -18,7 +18,7 @@ public class RitualEffectLava extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -44,12 +44,11 @@ public class RitualEffectLava extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { for (int i = 0; i < 10; i++) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(x, y, z, (short)3)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(x, y, z, (short) 3)); } world.setBlock(x, y + 1, z, Block.lavaMoving.blockID, 0, 3); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java index 8cbdb694..ad296891 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.PacketHandler; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.common.network.Player; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; @@ -13,8 +12,9 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; + +import java.util.Iterator; +import java.util.List; public class RitualEffectLeap extends RitualEffect { @@ -23,7 +23,7 @@ public class RitualEffectLeap extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -47,12 +47,11 @@ public class RitualEffectLeap extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { int direction = ritualStone.getDirection(); int d0 = 2; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y - 1, (double)z, (double)(x + 1), (double)(y + 2), (double)(z + 1)).expand(d0, 0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y - 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, 0, d0); List list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); EntityLivingBase entityplayer; @@ -60,7 +59,7 @@ public class RitualEffectLeap extends RitualEffect while (iterator.hasNext()) { - entityplayer = (EntityLivingBase)iterator.next(); + entityplayer = (EntityLivingBase) iterator.next(); if (entityplayer instanceof EntityPlayer) { @@ -70,26 +69,25 @@ public class RitualEffectLeap extends RitualEffect switch (direction) { case 1: - PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(0, 1.2, -3.0), (Player)entityplayer); + PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(0, 1.2, -3.0), (Player) entityplayer); break; case 2: - PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(3.0, 1.2, 0), (Player)entityplayer); + PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(3.0, 1.2, 0), (Player) entityplayer); break; case 3: - PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(0, 1.2, 3.0), (Player)entityplayer); + PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(0, 1.2, 3.0), (Player) entityplayer); break; case 4: - PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(-3.0, 1.2, 0), (Player)entityplayer); + PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(-3.0, 1.2, 0), (Player) entityplayer); break; } flag = true; - } - else - //if (!(entityplayer.getEntityName().equals(owner))) + } else + //if (!(entityplayer.getEntityName().equals(owner))) { // double xDif = entityplayer.posX - xCoord; // double yDif = entityplayer.posY - (yCoord + 1); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java index 40c91061..72603c1a 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java @@ -19,7 +19,7 @@ public class RitualEffectMagnetic extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -48,8 +48,7 @@ public class RitualEffectMagnetic extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { int xRep = 0; int yRep = 0; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSoulBound.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSoulBound.java index b4ccd9e0..7654fa98 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSoulBound.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSoulBound.java @@ -1,13 +1,11 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.ModItems; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import thaumcraft.api.ItemApi; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -18,8 +16,10 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.registry.GameRegistry; +import thaumcraft.api.ItemApi; + +import java.util.Iterator; +import java.util.List; public class RitualEffectSoulBound extends RitualEffect { @@ -28,7 +28,7 @@ public class RitualEffectSoulBound extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -52,20 +52,19 @@ public class RitualEffectSoulBound extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { if (ritualStone.getVar1() == 0) { int d0 = 0; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y + 1, (double)z, (double)(x + 1), (double)(y + 2), (double)(z + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); Iterator iterator = list.iterator(); EntityItem item; while (iterator.hasNext()) { - item = (EntityItem)iterator.next(); + item = (EntityItem) iterator.next(); // double xDif = item.posX - (xCoord+0.5); // double yDif = item.posY - (yCoord+1); // double zDif = item.posZ - (zCoord+0.5); @@ -83,49 +82,44 @@ public class RitualEffectSoulBound extends RitualEffect itemGoggles = ItemApi.getItem("itemGoggles", 0); } - if (itemStack.itemID == AlchemicalWizardry.apprenticeBloodOrb.itemID) + if (itemStack.itemID == ModItems.apprenticeBloodOrb.itemID) { - ritualStone.setVar1(AlchemicalWizardry.energyBlaster.itemID); + ritualStone.setVar1(ModItems.energyBlaster.itemID); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z)); ritualStone.setCooldown(ritualStone.getCooldown() - 1); item.setDead(); return; - } - else if (itemStack.itemID == Item.swordDiamond.itemID) + } else if (itemStack.itemID == Item.swordDiamond.itemID) { - ritualStone.setVar1(AlchemicalWizardry.energySword.itemID); + ritualStone.setVar1(ModItems.energySword.itemID); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z)); ritualStone.setCooldown(ritualStone.getCooldown() - 1); item.setDead(); return; - } - else if (itemStack.itemID == Item.pickaxeDiamond.itemID) + } else if (itemStack.itemID == Item.pickaxeDiamond.itemID) { - ritualStone.setVar1(AlchemicalWizardry.boundPickaxe.itemID); + ritualStone.setVar1(ModItems.boundPickaxe.itemID); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z)); ritualStone.setCooldown(ritualStone.getCooldown() - 1); item.setDead(); return; - } - else if (itemStack.itemID == Item.axeDiamond.itemID) + } else if (itemStack.itemID == Item.axeDiamond.itemID) { - ritualStone.setVar1(AlchemicalWizardry.boundAxe.itemID); + ritualStone.setVar1(ModItems.boundAxe.itemID); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z)); ritualStone.setCooldown(ritualStone.getCooldown() - 1); item.setDead(); return; - } - else if (itemStack.itemID == Item.shovelDiamond.itemID) + } else if (itemStack.itemID == Item.shovelDiamond.itemID) { - ritualStone.setVar1(AlchemicalWizardry.boundShovel.itemID); + ritualStone.setVar1(ModItems.boundShovel.itemID); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z)); ritualStone.setCooldown(ritualStone.getCooldown() - 1); item.setDead(); return; - } - else if (itemGoggles != null && itemGoggles.isItemEqual(itemStack)) + } else if (itemGoggles != null && itemGoggles.isItemEqual(itemStack)) { - ritualStone.setVar1(AlchemicalWizardry.sanguineHelmet.itemID); + ritualStone.setVar1(ModItems.sanguineHelmet.itemID); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z)); ritualStone.setCooldown(ritualStone.getCooldown() - 1); item.setDead(); @@ -134,14 +128,13 @@ public class RitualEffectSoulBound extends RitualEffect if (world.rand.nextInt(10) == 0) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(item.posX, item.posY, item.posZ, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(item.posX, item.posY, item.posZ, (short) 1)); } } data.currentEssence = currentEssence - this.getCostPerRefresh(); data.markDirty(); - } - else + } else { ritualStone.setCooldown(ritualStone.getCooldown() - 1); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java index b241705d..b320146f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java @@ -1,13 +1,9 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; @@ -16,6 +12,8 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import java.util.List; + public class RitualEffectSummonMeteor extends RitualEffect { @Override @@ -23,7 +21,7 @@ public class RitualEffectSummonMeteor extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -52,8 +50,7 @@ public class RitualEffectSummonMeteor extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { List entities = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y + 1, z, x + 1, y + 2, z + 1)); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java index 9af632b3..86d78825 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java @@ -1,8 +1,13 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.ModBlocks; +import WayofTime.alchemicalWizardry.common.ModItems; +import WayofTime.alchemicalWizardry.common.items.BoundArmour; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.block.Block; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; @@ -14,13 +19,9 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.common.items.BoundArmour; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.common.network.PacketDispatcher; + +import java.util.Iterator; +import java.util.List; public class RitualEffectUnbinding extends RitualEffect { @@ -29,7 +30,7 @@ public class RitualEffectUnbinding extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -53,18 +54,17 @@ public class RitualEffectUnbinding extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { int d0 = 0; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y + 1, (double)z, (double)(x + 1), (double)(y + 2), (double)(z + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); Iterator iterator = list.iterator(); EntityItem item; while (iterator.hasNext()) { - item = (EntityItem)iterator.next(); + item = (EntityItem) iterator.next(); // double xDif = item.posX - (xCoord+0.5); // double yDif = item.posY - (yCoord+1); // double zDif = item.posZ - (zCoord+0.5); @@ -75,23 +75,19 @@ public class RitualEffectUnbinding extends RitualEffect continue; } - if (itemStack.itemID == AlchemicalWizardry.boundHelmet.itemID) + if (itemStack.itemID == ModItems.boundHelmet.itemID) { ritualStone.setVar1(5); - } - else if (itemStack.itemID == AlchemicalWizardry.boundPlate.itemID) + } else if (itemStack.itemID == ModItems.boundPlate.itemID) { ritualStone.setVar1(8); - } - else if (itemStack.itemID == AlchemicalWizardry.boundLeggings.itemID) + } else if (itemStack.itemID == ModItems.boundLeggings.itemID) { ritualStone.setVar1(7); - } - else if (itemStack.itemID == AlchemicalWizardry.boundBoots.itemID) + } else if (itemStack.itemID == ModItems.boundBoots.itemID) { ritualStone.setVar1(4); - } - else if (itemStack.itemID == AlchemicalWizardry.sigilOfHolding.itemID) + } else if (itemStack.itemID == ModItems.sigilOfHolding.itemID) { ritualStone.setVar1(-1); } @@ -104,7 +100,7 @@ public class RitualEffectUnbinding extends RitualEffect world.addWeatherEffect(new EntityLightningBolt(world, x - 5, y + 1, z)); world.addWeatherEffect(new EntityLightningBolt(world, x + 5, y + 1, z)); NBTTagCompound itemTag = itemStack.stackTagCompound; - ItemStack[] inv = ((BoundArmour)itemStack.getItem()).getInternalInventory(itemStack); + ItemStack[] inv = ((BoundArmour) itemStack.getItem()).getInternalInventory(itemStack); if (inv != null) { @@ -118,12 +114,11 @@ public class RitualEffectUnbinding extends RitualEffect } } - EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(Block.blocksList[AlchemicalWizardry.bloodSocket.blockID], ritualStone.getVar1())); + EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(Block.blocksList[ModBlocks.bloodSocket.blockID], ritualStone.getVar1())); world.spawnEntityInWorld(newItem); ritualStone.setActive(false); break; - } - else if (ritualStone.getVar1() == -1) + } else if (ritualStone.getVar1() == -1) { item.setDead(); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z - 5)); @@ -131,7 +126,7 @@ public class RitualEffectUnbinding extends RitualEffect world.addWeatherEffect(new EntityLightningBolt(world, x - 5, y + 1, z)); world.addWeatherEffect(new EntityLightningBolt(world, x + 5, y + 1, z)); NBTTagCompound itemTag = itemStack.stackTagCompound; - ItemStack[] inv = ((SigilOfHolding)itemStack.getItem()).getInternalInventory(itemStack); + ItemStack[] inv = ((SigilOfHolding) itemStack.getItem()).getInternalInventory(itemStack); if (inv != null) { @@ -145,7 +140,7 @@ public class RitualEffectUnbinding extends RitualEffect } } - EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(AlchemicalWizardry.sigilOfHolding.itemID, 1, 0)); + EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(ModItems.sigilOfHolding.itemID, 1, 0)); world.spawnEntityInWorld(newItem); ritualStone.setActive(false); break; @@ -153,7 +148,7 @@ public class RitualEffectUnbinding extends RitualEffect if (world.rand.nextInt(10) == 0) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(item.posX, item.posY, item.posZ, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(item.posX, item.posY, item.posZ, (short) 1)); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java index 2bbc31e4..0a7fdc87 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java @@ -3,13 +3,13 @@ package WayofTime.alchemicalWizardry.common.rituals; import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; public class RitualEffectWater extends RitualEffect { @@ -17,7 +17,7 @@ public class RitualEffectWater extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -43,12 +43,11 @@ public class RitualEffectWater extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { for (int i = 0; i < 10; i++) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(x, y, z, (short)3)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(x, y, z, (short) 3)); } world.setBlock(x, y + 1, z, Block.waterMoving.blockID, 0, 3); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java index 9dfcb524..16727977 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java @@ -1,12 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; @@ -15,8 +11,9 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; + +import java.util.Iterator; +import java.util.List; public class RitualEffectWellOfSuffering extends RitualEffect { @@ -28,7 +25,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect { String owner = ritualStone.getOwner(); World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -62,7 +59,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect { if (world.getBlockTileEntity(x + i, y + k, z + j) instanceof TEAltar) { - tileAltar = (TEAltar)world.getBlockTileEntity(x + i, y + k, z + j); + tileAltar = (TEAltar) world.getBlockTileEntity(x + i, y + k, z + j); testFlag = true; } } @@ -77,7 +74,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect //tileAltar = (TEAltar)world.getBlockTileEntity(x,y-1,z); int d0 = 10; int vertRange = 5; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y, (double)z, (double)(x + 1), (double)(y + 1), (double)(z + 1)).expand(d0, vertRange, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, vertRange, d0); List list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator1 = list.iterator(); EntityLivingBase entity; @@ -86,7 +83,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect while (iterator1.hasNext()) { - entity = (EntityLivingBase)iterator1.next(); + entity = (EntityLivingBase) iterator1.next(); entityCount++; } @@ -100,15 +97,14 @@ public class RitualEffectWellOfSuffering extends RitualEffect } entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } - else + } else { Iterator iterator2 = list.iterator(); entityCount = 0; while (iterator2.hasNext()) { - entity = (EntityLivingBase)iterator2.next(); + entity = (EntityLivingBase) iterator2.next(); if (entity instanceof EntityPlayer) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/Rituals.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/Rituals.java index 4d370bdc..bb985ec6 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/Rituals.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/Rituals.java @@ -1,14 +1,14 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - import WayofTime.alchemicalWizardry.common.block.RitualStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; +import java.util.ArrayList; +import java.util.List; + public class Rituals { private List components; @@ -57,8 +57,7 @@ public class Rituals if (ritual <= ritualList.size()) { return ritualList.get(ritual - 1).crystalLevel <= crystalLevel; - } - else + } else { return false; } @@ -112,12 +111,13 @@ public class Rituals // // return true; } + /** - 1 - NORTH - 2 - EAST - 3 - SOUTH - 4 - WEST - */ + * 1 - NORTH + * 2 - EAST + * 3 - SOUTH + * 4 - WEST + */ public static boolean checkDirectionOfRitualValid(World world, int x, int y, int z, int ritualID, int direction) { List ritual = Rituals.getRitualList(ritualID); @@ -895,8 +895,7 @@ public class Rituals if (ritualID <= ritualList.size()) { return ritualList.get(ritualID - 1).actCost; - } - else + } else { return 0; } @@ -985,8 +984,7 @@ public class Rituals if (ritualID <= ritualList.size()) { return ritualList.get(ritualID - 1).obtainComponents(); - } - else + } else { return null; } @@ -1060,8 +1058,7 @@ public class Rituals if (ritualList.get(id) != null) { return ritualList.get(id).getRitualName(); - } - else + } else { return ""; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java index f49f2c84..903f4fb9 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/HomSpell.java @@ -20,7 +20,9 @@ public abstract class HomSpell implements ISimpleSpell } @Override - public abstract ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer);; + public abstract ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + + ; @Override public abstract ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); @@ -76,7 +78,7 @@ public abstract class HomSpell implements ISimpleSpell itemStack.setTagCompound(new NBTTagCompound()); } - return(itemStack.stackTagCompound.getInteger("paradigm")); + return (itemStack.stackTagCompound.getInteger("paradigm")); } //@Override @@ -89,8 +91,7 @@ public abstract class HomSpell implements ISimpleSpell if (paradigm < 3) { this.setSpellParadigm(par1ItemStack, paradigm + 1); - } - else + } else { this.setSpellParadigm(par1ItemStack, 0); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java index cfff11af..06551124 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellRegistry.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import java.util.ArrayList; +import java.util.List; + public class HomSpellRegistry { public static List spellList = new ArrayList(); @@ -28,7 +28,7 @@ public class HomSpellRegistry if (item != null) { - if (item.getItem()instanceof ItemBlock) + if (item.getItem() instanceof ItemBlock) { if (testItem.getItem() instanceof ItemBlock) { @@ -37,8 +37,7 @@ public class HomSpellRegistry return hsc.getSpell(); } } - } - else + } else { if (!(testItem.getItem() instanceof ItemBlock)) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java index b5a69131..77a8799d 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java @@ -7,7 +7,10 @@ import net.minecraft.world.World; public interface ISimpleSpell { public abstract ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java index 4933ba59..af91d66e 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java @@ -1,15 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.PacketHandler; import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import cpw.mods.fml.common.network.PacketDispatcher; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import java.util.Random; public class SpellEarthBender extends HomSpell { @@ -21,6 +21,7 @@ public class SpellEarthBender extends HomSpell this.setEnergies(100, 150, 350, 200); //this.setCreativeTab(CreativeTabs.tabMisc); } + @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -88,9 +89,9 @@ public class SpellEarthBender extends HomSpell double xCoord = par3EntityPlayer.posX; double yCoord = par3EntityPlayer.posY; double zCoord = par3EntityPlayer.posZ; - int posX = (int)xCoord; - int posY = (int)yCoord; - int posZ = (int)zCoord; + int posX = (int) xCoord; + int posY = (int) yCoord; + int posZ = (int) zCoord; int blockID = Block.stone.blockID; if (par2World.isAirBlock(posX, posY + 3, posZ)) @@ -164,17 +165,16 @@ public class SpellEarthBender extends HomSpell { for (int k = -range; k <= range; k++) { - if (par2World.getBlockId((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + k) == Block.waterStill.blockID || par2World.getBlockId((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + k) == Block.waterMoving.blockID) + if (par2World.getBlockId((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k) == Block.waterStill.blockID || par2World.getBlockId((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k) == Block.waterMoving.blockID) { int x = par2World.rand.nextInt(2); if (x == 0) { - par2World.setBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + k, Block.sand.blockID); - } - else + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Block.sand.blockID); + } else { - par2World.setBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + k, Block.dirt.blockID); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Block.dirt.blockID); } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java index aa525aec..44ede225 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; + +import java.util.Random; public class SpellExplosions extends HomSpell { @@ -63,7 +63,7 @@ public class SpellExplosions extends HomSpell int distance = 4; double yaw = par3EntityPlayer.rotationYaw / 180 * Math.PI; double pitch = par3EntityPlayer.rotationPitch / 180 * Math.PI; - par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance, (float)(3), true); + par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance, (float) (3), true); return par1ItemStack; } @@ -85,7 +85,7 @@ public class SpellExplosions extends HomSpell int distance = 4; // double yaw = par3EntityPlayer.rotationYaw/180*Math.PI; // double pitch = par3EntityPlayer.rotationPitch/180*Math.PI; - par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, (float)(distance), false); + par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, (float) (distance), false); return par1ItemStack; } @@ -108,7 +108,7 @@ public class SpellExplosions extends HomSpell for (int i = 0; i < 360; i += 36) { - par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX + Math.cos(i) * radius, par3EntityPlayer.posY, par3EntityPlayer.posZ + Math.sin(i) * radius, (float)(2), true); + par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX + Math.cos(i) * radius, par3EntityPlayer.posY, par3EntityPlayer.posZ + Math.sin(i) * radius, (float) (2), true); } return null; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java index 5a820aaa..0cc85b32 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java @@ -1,9 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -11,12 +9,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; + +import java.util.Iterator; +import java.util.List; +import java.util.Random; public class SpellFireBurst extends HomSpell { public Random itemRand = new Random(); + public SpellFireBurst() { super(); @@ -98,14 +99,14 @@ public class SpellFireBurst extends HomSpell par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); int d0 = 2; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)par3EntityPlayer.posX, (double)par3EntityPlayer.posY, (double)par3EntityPlayer.posZ, (double)(par3EntityPlayer.posX + 1), (double)(par3EntityPlayer.posY + 2), (double)(par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); //axisalignedbb.maxY = (double)this.worldObj.getHeight(); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); while (iterator.hasNext()) { - EntityLivingBase entityLiving = (EntityLivingBase)iterator.next(); + EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); if (entityLiving instanceof EntityPlayer) { @@ -157,11 +158,11 @@ public class SpellFireBurst extends HomSpell { for (int k = -1; k <= 1; k++) { - if (worldObj.isAirBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + k)) + if (worldObj.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k)) { if (worldObj.rand.nextFloat() < 0.8F) { - worldObj.setBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + k, Block.fire.blockID); + worldObj.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Block.fire.blockID); } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java index 10337f19..b993e454 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java @@ -1,17 +1,18 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; + +import java.util.Random; public class SpellFrozenWater extends HomSpell { public Random itemRand = new Random(); + public SpellFrozenWater() { super(); @@ -86,24 +87,23 @@ public class SpellFrozenWater extends HomSpell { for (int j = -range; j <= range; j++) { - if (par2World.isAirBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY - 1, (int)par3EntityPlayer.posZ + j)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY - 1, (int) par3EntityPlayer.posZ + j)) { - par2World.setBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY - 1, (int)par3EntityPlayer.posZ + j, Block.ice.blockID); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY - 1, (int) par3EntityPlayer.posZ + j, Block.ice.blockID); } } } return par1ItemStack; - } - else if (pitch < -40F) + } else if (pitch < -40F) { for (int i = -range; i <= range; i++) { for (int j = -range; j <= range; j++) { - if (par2World.isAirBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + 3, (int)par3EntityPlayer.posZ + j)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + 3, (int) par3EntityPlayer.posZ + j)) { - par2World.setBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + 3, (int)par3EntityPlayer.posZ + j, Block.ice.blockID); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + 3, (int) par3EntityPlayer.posZ + j, Block.ice.blockID); } } } @@ -117,48 +117,45 @@ public class SpellFrozenWater extends HomSpell { for (int j = 0; j < range * 2 + 1; j++) { - if (par2World.isAirBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + 2)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + 2)) { - par2World.setBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + 2, Block.ice.blockID); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + 2, Block.ice.blockID); } } } - } - else if (yaw >= 45 && yaw < 135) + } else if (yaw >= 45 && yaw < 135) { for (int i = -range; i <= range; i++) { for (int j = 0; j < range * 2 + 1; j++) { - if (par2World.isAirBlock((int)par3EntityPlayer.posX - 2, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + i)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX - 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i)) { - par2World.setBlock((int)par3EntityPlayer.posX - 2, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + i, Block.ice.blockID); + par2World.setBlock((int) par3EntityPlayer.posX - 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i, Block.ice.blockID); } } } - } - else if (yaw >= 135 && yaw < 225) + } else if (yaw >= 135 && yaw < 225) { for (int i = -range; i <= range; i++) { for (int j = 0; j < range * 2 + 1; j++) { - if (par2World.isAirBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ - 2)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ - 2)) { - par2World.setBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ - 2, Block.ice.blockID); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ - 2, Block.ice.blockID); } } } - } - else + } else { for (int i = -range; i <= range; i++) { for (int j = 0; j < range * 2 + 1; j++) { - if (par2World.isAirBlock((int)par3EntityPlayer.posX + 2, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + i)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i)) { - par2World.setBlock((int)par3EntityPlayer.posX + 2, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + i, Block.ice.blockID); + par2World.setBlock((int) par3EntityPlayer.posX + 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i, Block.ice.blockID); } } } @@ -178,9 +175,9 @@ public class SpellFrozenWater extends HomSpell } int radius = 3; - int posX = (int)par3EntityPlayer.posX; - int posY = (int)par3EntityPlayer.posY; - int posZ = (int)par3EntityPlayer.posZ; + int posX = (int) par3EntityPlayer.posX; + int posY = (int) par3EntityPlayer.posY; + int posZ = (int) par3EntityPlayer.posZ; for (int i = -radius; i <= radius; i++) { @@ -188,12 +185,12 @@ public class SpellFrozenWater extends HomSpell { for (int k = -radius; k <= radius; k++) { - int blockID = par2World.getBlockId((int)par3EntityPlayer.posX + i - 1, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + k); + int blockID = par2World.getBlockId((int) par3EntityPlayer.posX + i - 1, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k); //Block block = Block.blocksList[blockID]; if (blockID == Block.waterMoving.blockID || blockID == Block.waterStill.blockID) { - par2World.setBlock((int)par3EntityPlayer.posX + i - 1, (int)par3EntityPlayer.posY + j, (int)par3EntityPlayer.posZ + k, Block.ice.blockID); + par2World.setBlock((int) par3EntityPlayer.posX + i - 1, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Block.ice.blockID); } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java index 8771b47d..7752fb08 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java @@ -1,19 +1,19 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.common.network.PacketDispatcher; + +import java.util.Iterator; +import java.util.List; +import java.util.Random; public class SpellHolyBlast extends HomSpell { @@ -25,6 +25,7 @@ public class SpellHolyBlast extends HomSpell this.setEnergies(100, 300, 500, 400); //this.setCreativeTab(CreativeTabs.tabMisc); } + @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -80,7 +81,7 @@ public class SpellHolyBlast extends HomSpell while (iterator.hasNext()) { - EntityLivingBase entityLiving = (EntityLivingBase)iterator.next(); + EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); if (entityLiving instanceof EntityPlayer) { @@ -102,7 +103,7 @@ public class SpellHolyBlast extends HomSpell //par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false); } - par2World.createExplosion(par3EntityPlayer, xCoord, yCoord, zCoord, (float)(1), false); + par2World.createExplosion(par3EntityPlayer, xCoord, yCoord, zCoord, (float) (1), false); for (int i = 0; i < 5; i++) { @@ -154,14 +155,14 @@ public class SpellHolyBlast extends HomSpell } int d0 = 3; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)par3EntityPlayer.posX, (double)par3EntityPlayer.posY, (double)par3EntityPlayer.posZ, (double)(par3EntityPlayer.posX + 1), (double)(par3EntityPlayer.posY + 2), (double)(par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); //axisalignedbb.maxY = (double)this.worldObj.getHeight(); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); while (iterator.hasNext()) { - EntityLivingBase entityLiving = (EntityLivingBase)iterator.next(); + EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); if (entityLiving instanceof EntityPlayer) { @@ -183,7 +184,7 @@ public class SpellHolyBlast extends HomSpell //par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false); } - par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false); + par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float) (2), false); double xCoord = par3EntityPlayer.posX; double yCoord = par3EntityPlayer.posY; double zCoord = par3EntityPlayer.posZ; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java index f8ccba6e..d75feb7c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java @@ -1,15 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Random; - -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.PacketHandler; import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import cpw.mods.fml.common.network.PacketDispatcher; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import java.util.Random; public class SpellLightningBolt extends HomSpell { @@ -21,6 +21,7 @@ public class SpellLightningBolt extends HomSpell this.setEnergies(75, 200, 700, 700); //this.setCreativeTab(CreativeTabs.tabMisc); } + @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java index 32dec0d2..1e39a48c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -16,10 +16,10 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.common.network.PacketDispatcher; + +import java.util.Iterator; +import java.util.List; +import java.util.Random; public class SpellTeleport extends HomSpell { @@ -31,6 +31,7 @@ public class SpellTeleport extends HomSpell this.setEnergies(500, 300, 500, 1000); //this.setCreativeTab(CreativeTabs.tabMisc); } + @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -117,14 +118,14 @@ public class SpellTeleport extends HomSpell if (!par2World.isRemote) { int d0 = 3; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)par3EntityPlayer.posX, (double)par3EntityPlayer.posY, (double)par3EntityPlayer.posZ, (double)(par3EntityPlayer.posX + 1), (double)(par3EntityPlayer.posY + 2), (double)(par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); //axisalignedbb.maxY = (double)this.worldObj.getHeight(); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); while (iterator.hasNext()) { - EntityLivingBase entityLiving = (EntityLivingBase)iterator.next(); + EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); if (entityLiving instanceof EntityPlayer) { @@ -158,14 +159,14 @@ public class SpellTeleport extends HomSpell double z = entityLiving.posZ; Random rand = new Random(); double d0 = x + (rand.nextDouble() - 0.5D) * distance; - double d1 = y + (double)(rand.nextInt((int)distance) - (distance) / 2); + double d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); double d2 = z + (rand.nextDouble() - 0.5D) * distance; int i = 0; while (!SpellTeleport.teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100) { d0 = x + (rand.nextDouble() - 0.5D) * distance; - d1 = y + (double)(rand.nextInt((int)distance) - (distance) / 2); + d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); d2 = z + (rand.nextDouble() - 0.5D) * distance; i++; } @@ -209,8 +210,7 @@ public class SpellTeleport extends HomSpell if (l != 0 && Block.blocksList[l].blockMaterial.blocksMovement()) { flag1 = true; - } - else + } else { --entityLiving.posY; --j; @@ -232,21 +232,20 @@ public class SpellTeleport extends HomSpell { SpellTeleport.moveEntityViaTeleport(entityLiving, d3, d4, d5); return false; - } - else + } else { short short1 = 128; for (l = 0; l < short1; ++l) { - double d6 = (double)l / ((double)short1 - 1.0D); + double d6 = (double) l / ((double) short1 - 1.0D); float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double)entityLiving.width * 2.0D; - double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double)entityLiving.height; - double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double)entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double)f, (double)f1, (double)f2); + double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; + double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; + double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; + entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); } // this.worldObj.playSoundEffect(d3, d4, d5, "mob.endermen.portal", 1.0F, 1.0F); @@ -261,7 +260,7 @@ public class SpellTeleport extends HomSpell { if (entityLiving != null && entityLiving instanceof EntityPlayerMP) { - EntityPlayerMP entityplayermp = (EntityPlayerMP)entityLiving; + EntityPlayerMP entityplayermp = (EntityPlayerMP) entityLiving; if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == entityLiving.worldObj) { @@ -271,7 +270,7 @@ public class SpellTeleport extends HomSpell { if (entityLiving.isRiding()) { - entityLiving.mountEntity((Entity)null); + entityLiving.mountEntity((Entity) null); } entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); @@ -280,8 +279,7 @@ public class SpellTeleport extends HomSpell } } } - } - else if (entityLiving != null) + } else if (entityLiving != null) { entityLiving.setPosition(x, y, z); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java index 26246930..2962f318 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java @@ -1,9 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -12,11 +13,10 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.common.network.PacketDispatcher; + +import java.util.Iterator; +import java.util.List; +import java.util.Random; public class SpellWateryGrave extends HomSpell { @@ -28,6 +28,7 @@ public class SpellWateryGrave extends HomSpell this.setEnergies(250, 350, 500, 750); //this.setCreativeTab(CreativeTabs.tabMisc); } + @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -93,14 +94,14 @@ public class SpellWateryGrave extends HomSpell } int d0 = 3; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)par3EntityPlayer.posX, (double)par3EntityPlayer.posY, (double)par3EntityPlayer.posZ, (double)(par3EntityPlayer.posX + 1), (double)(par3EntityPlayer.posY + 2), (double)(par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); //axisalignedbb.maxY = (double)this.worldObj.getHeight(); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); while (iterator.hasNext()) { - EntityLivingBase entityLiving = (EntityLivingBase)iterator.next(); + EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); if (entityLiving instanceof EntityPlayer) { @@ -156,9 +157,9 @@ public class SpellWateryGrave extends HomSpell { for (int j = -range; j <= range; j++) { - if (par2World.isAirBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY, (int)par3EntityPlayer.posZ + j)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ + j)) { - par2World.setBlock((int)par3EntityPlayer.posX + i, (int)par3EntityPlayer.posY, (int)par3EntityPlayer.posZ + j, Block.waterStill.blockID); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ + j, Block.waterStill.blockID); } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java index d6ecc730..62914b62 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java @@ -1,20 +1,20 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.common.network.PacketDispatcher; +import cpw.mods.fml.common.network.Player; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; + +import java.util.Iterator; +import java.util.List; +import java.util.Random; public class SpellWindGust extends HomSpell { @@ -26,6 +26,7 @@ public class SpellWindGust extends HomSpell this.setEnergies(300, 400, 300, 500); //this.setCreativeTab(CreativeTabs.tabMisc); } + @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -81,7 +82,7 @@ public class SpellWindGust extends HomSpell while (iterator.hasNext()) { - EntityLivingBase entityLiving = (EntityLivingBase)iterator.next(); + EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); if (entityLiving instanceof EntityPlayer) { @@ -136,8 +137,8 @@ public class SpellWindGust extends HomSpell par3EntityPlayer.motionX = vec.xCoord * wantedVelocity; par3EntityPlayer.motionY = vec.yCoord * wantedVelocity; par3EntityPlayer.motionZ = vec.zCoord * wantedVelocity; - PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(xVel, yVel, zVel), (Player)par3EntityPlayer); - par2World.playSoundEffect((double)((float)par3EntityPlayer.posX + 0.5F), (double)((float)par3EntityPlayer.posY + 0.5F), (double)((float)par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); + PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(xVel, yVel, zVel), (Player) par3EntityPlayer); + par2World.playSoundEffect((double) ((float) par3EntityPlayer.posX + 0.5F), (double) ((float) par3EntityPlayer.posY + 0.5F), (double) ((float) par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F); par3EntityPlayer.fallDistance = 0; //par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false); double xCoord = par3EntityPlayer.posX; @@ -168,7 +169,7 @@ public class SpellWindGust extends HomSpell } int d0 = 3; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)par3EntityPlayer.posX, (double)par3EntityPlayer.posY, (double)par3EntityPlayer.posZ, (double)(par3EntityPlayer.posX + 1), (double)(par3EntityPlayer.posY + 2), (double)(par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); //axisalignedbb.maxY = (double)this.worldObj.getHeight(); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -179,7 +180,7 @@ public class SpellWindGust extends HomSpell while (iterator.hasNext()) { - EntityLivingBase entityLiving = (EntityLivingBase)iterator.next(); + EntityLivingBase entityLiving = (EntityLivingBase) iterator.next(); if (entityLiving instanceof EntityPlayer) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningHelper.java b/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningHelper.java index 35fe7fd1..e6c2fa0b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningHelper.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningHelper.java @@ -2,19 +2,7 @@ package WayofTime.alchemicalWizardry.common.summoning; import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.EntityAirElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; +import WayofTime.alchemicalWizardry.common.entity.mob.*; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.passive.EntityPig; import net.minecraft.world.World; @@ -27,6 +15,7 @@ public class SummoningHelper { this.id = id; } + public EntityLivingBase getEntity(World worldObj) { if (this.id == AlchemicalWizardry.entityFallenAngelID) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningRegistry.java b/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningRegistry.java index 599b407b..8f4fac89 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningRegistry.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningRegistry.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.summoning; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import java.util.ArrayList; +import java.util.List; + public class SummoningRegistry { public static List summoningList = new ArrayList(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningRegistryComponent.java b/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningRegistryComponent.java index 0d501ed6..918eca68 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningRegistryComponent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningRegistryComponent.java @@ -33,8 +33,7 @@ public class SummoningRegistryComponent if (i + 1 > this.ring1.length) { newRecipe[i] = null; - } - else + } else { newRecipe[i] = this.ring1[i]; } @@ -52,8 +51,7 @@ public class SummoningRegistryComponent if (i + 1 > this.ring2.length) { newRecipe[i] = null; - } - else + } else { newRecipe[i] = this.ring2[i]; } @@ -71,8 +69,7 @@ public class SummoningRegistryComponent if (i + 1 > this.ring3.length) { newRecipe[i] = null; - } - else + } else { newRecipe[i] = this.ring3[i]; } @@ -118,8 +115,7 @@ public class SummoningRegistryComponent if (i + 1 > recipe.length) { newRecipe[i] = null; - } - else + } else { newRecipe[i] = recipe[i]; } @@ -168,8 +164,7 @@ public class SummoningRegistryComponent { quickTest = true; } - } - else if (!(checkedItemStack.getItem() instanceof ItemBlock)) + } else if (!(checkedItemStack.getItem() instanceof ItemBlock)) { quickTest = true; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java b/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java index 6c1e12b4..e10e8512 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java @@ -1,13 +1,13 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; -import java.util.ArrayList; -import java.util.List; - import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import java.util.ArrayList; +import java.util.List; + public class MeteorParadigm { public List componentList = new ArrayList(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java b/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java index 4d4ce771..0daa43a1 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigmComponent.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; -import java.util.List; - import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import java.util.List; + public class MeteorParadigmComponent { public String oreDictName; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java b/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java index 3d9dcfa4..098eb407 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; +import java.util.ArrayList; +import java.util.List; + public class MeteorRegistry { public static List paradigmList = new ArrayList(); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index 65bde23c..de14ddf3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -1,9 +1,10 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.IOException; - +import WayofTime.alchemicalWizardry.common.*; +import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.AltarUpgradeComponent; +import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -18,21 +19,11 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidEvent; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; -import net.minecraftforge.fluids.IFluidTank; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.AltarUpgradeComponent; -import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -import cpw.mods.fml.common.network.PacketDispatcher; +import net.minecraftforge.fluids.*; + +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFluidHandler { @@ -189,8 +180,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (fluid != null) { fluid.writeToNBT(par1NBTTagCompound); - } - else + } else { par1NBTTagCompound.setString("Empty", ""); } @@ -247,8 +237,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (stack.stackSize <= amt) { setInventorySlotContents(slot, null); - } - else + } else { stack = stack.splitStack(amt); @@ -416,8 +405,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui { fluidInput.amount += resource.amount; filled = resource.amount; - } - else + } else { fluidInput.amount = bufferCapacity; } @@ -483,7 +471,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (!worldObj.isRemote && worldObj.getWorldTime() % 20 == 0) { //TODO - int syphonMax = (int)(20 * this.dislocationMultiplier); + int syphonMax = (int) (20 * this.dislocationMultiplier); int fluidInputted = 0; int fluidOutputted = 0; fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity); @@ -511,7 +499,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui return; } - int worldTime = (int)(worldObj.getWorldTime() % 24000); + int worldTime = (int) (worldObj.getWorldTime() % 24000); if (worldObj.isRemote) { @@ -525,7 +513,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (fluid != null && fluid.amount >= 1) { int stackSize = getStackInSlot(0).stackSize; - int liquidDrained = Math.min((int)(upgradeLevel >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate), fluid.amount); + int liquidDrained = Math.min((int) (upgradeLevel >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate), fluid.amount); if (liquidDrained > (liquidRequired * stackSize - progress)) { @@ -538,7 +526,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (worldTime % 4 == 0) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); } if (progress >= liquidRequired * stackSize) @@ -548,8 +536,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (!isResultBlock) { result = new ItemStack(resultID, stackSize, resultDamage); - } - else + } else { result = new ItemStack(Block.blocksList[resultID], stackSize, 0); } @@ -559,24 +546,22 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui for (int i = 0; i < 8; i++) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord + 0.5, yCoord + 1, zCoord + 0.5, (short)4)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord + 0.5, yCoord + 1, zCoord + 0.5, (short) 4)); } //setInventorySlotContents(1, null); this.isActive = false; } - } - else if (progress > 0) + } else if (progress > 0) { - progress -= (int)(efficiencyMultiplier * drainRate); + progress -= (int) (efficiencyMultiplier * drainRate); if (worldTime % 2 == 0) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short)2)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 2)); } } - } - else + } else { ItemStack returnedItem = getStackInSlot(0); @@ -585,7 +570,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui return; } - EnergyBattery item = (EnergyBattery)(returnedItem.getItem()); + EnergyBattery item = (EnergyBattery) (returnedItem.getItem()); NBTTagCompound itemTag = returnedItem.stackTagCompound; if (itemTag == null) @@ -602,7 +587,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui //EntityPlayer owner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(itemTag.getString("ownerName")); World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName); + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); if (data == null) { @@ -618,11 +603,11 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (fluid != null && fluid.amount >= 1) { - int liquidDrained = Math.min((int)(upgradeLevel >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate), fluid.amount); + int liquidDrained = Math.min((int) (upgradeLevel >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate), fluid.amount); if (liquidDrained > (item.getMaxEssence() * this.orbCapacityMultiplier - currentEssence)) { - liquidDrained = (int)(item.getMaxEssence() * this.orbCapacityMultiplier - currentEssence); + liquidDrained = (int) (item.getMaxEssence() * this.orbCapacityMultiplier - currentEssence); } if (liquidDrained <= 0) @@ -639,7 +624,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (worldTime % 4 == 0) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short)3)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 3)); } } } @@ -695,8 +680,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui dos.writeDouble(y); dos.writeDouble(z); dos.writeShort(particleType); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -719,8 +703,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui { ItemStack is = new ItemStack(intData[i * 3], intData[i * 3 + 2], intData[i * 3 + 1]); inv[i] = is; - } - else + } else { inv[i] = null; } @@ -735,7 +718,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui public int[] buildIntDataList() { - int [] sortList = new int[1 * 3]; + int[] sortList = new int[1 * 3]; int pos = 0; for (ItemStack is : inv) @@ -745,8 +728,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui sortList[pos++] = is.itemID; sortList[pos++] = is.getItemDamage(); sortList[pos++] = is.stackSize; - } - else + } else { sortList[pos++] = 0; sortList[pos++] = 0; @@ -796,7 +778,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 20; drainRate = 10; - resultID = AlchemicalWizardry.duskScribeTool.itemID; + resultID = ModItems.duskScribeTool.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -814,14 +796,14 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui consumptionRate = 20; drainRate = 20; //ItemStack bloodOrb = new ItemStack(AlchemicalWizardry.magicianBloodOrb); - resultID = AlchemicalWizardry.magicianBloodOrb.itemID; + resultID = ModItems.magicianBloodOrb.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.emptySocket.blockID) + if (getStackInSlot(0).itemID == ModBlocks.emptySocket.blockID) { isActive = true; liquidRequired = 30000; @@ -829,7 +811,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui consumptionRate = 40; drainRate = 10; //ItemStack bloodOrb = new ItemStack(AlchemicalWizardry.weakBloodOrb); - resultID = AlchemicalWizardry.bloodSocket.blockID; + resultID = ModBlocks.bloodSocket.blockID; resultDamage = 0; isResultBlock = true; //setInventorySlotContents(1, bloodOrb); @@ -843,7 +825,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 5; drainRate = 5; - resultID = AlchemicalWizardry.earthScribeTool.itemID; + resultID = ModItems.earthScribeTool.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -857,7 +839,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 5; drainRate = 5; - resultID = AlchemicalWizardry.waterScribeTool.itemID; + resultID = ModItems.waterScribeTool.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -874,7 +856,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 5; drainRate = 5; - resultID = AlchemicalWizardry.blankSpell.itemID; + resultID = ModItems.blankSpell.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -889,14 +871,13 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 5; drainRate = 5; - resultID = AlchemicalWizardry.blankSlate.itemID; + resultID = ModItems.blankSlate.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - } - else + } else { // if(!getStackInSlot(0).isItemDamaged()&&getStackInSlot(0).getItemDamage()>16&&!isActive) // { @@ -904,21 +885,21 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui // } if (upgradeLevel >= 5) { - if (getStackInSlot(0).itemID == AlchemicalWizardry.demonBloodShard.itemID) + if (getStackInSlot(0).itemID == ModItems.demonBloodShard.itemID) { isActive = true; liquidRequired = 75000; canBeFilled = false; consumptionRate = 50; drainRate = 100; - resultID = AlchemicalWizardry.archmageBloodOrb.itemID; + resultID = ModItems.archmageBloodOrb.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.archmageBloodOrb.itemID) + if (getStackInSlot(0).itemID == ModItems.archmageBloodOrb.itemID) { ItemStack item = getStackInSlot(0); @@ -937,21 +918,21 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (upgradeLevel >= 4) { - if (getStackInSlot(0).itemID == AlchemicalWizardry.weakBloodShard.itemID) + if (getStackInSlot(0).itemID == ModItems.weakBloodShard.itemID) { isActive = true; liquidRequired = 40000; canBeFilled = false; consumptionRate = 30; drainRate = 50; - resultID = AlchemicalWizardry.masterBloodOrb.itemID; + resultID = ModItems.masterBloodOrb.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.masterBloodOrb.itemID) + if (getStackInSlot(0).itemID == ModItems.masterBloodOrb.itemID) { ItemStack item = getStackInSlot(0); @@ -974,36 +955,36 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 10; drainRate = 10; - resultID = AlchemicalWizardry.telepositionFocus.itemID; + resultID = ModItems.telepositionFocus.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.telepositionFocus.itemID) + if (getStackInSlot(0).itemID == ModItems.telepositionFocus.itemID) { isActive = true; liquidRequired = 10000; canBeFilled = false; consumptionRate = 25; drainRate = 15; - resultID = AlchemicalWizardry.enhancedTelepositionFocus.itemID; + resultID = ModItems.enhancedTelepositionFocus.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.imbuedSlate.itemID) + if (getStackInSlot(0).itemID == ModItems.imbuedSlate.itemID) { isActive = true; liquidRequired = 15000; canBeFilled = false; consumptionRate = 5; drainRate = 5; - ItemStack bloodOrb = new ItemStack(AlchemicalWizardry.apprenticeBloodOrb); - resultID = AlchemicalWizardry.demonicSlate.itemID; + ItemStack bloodOrb = new ItemStack(ModItems.apprenticeBloodOrb); + resultID = ModItems.demonicSlate.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -1013,7 +994,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui if (upgradeLevel >= 3) { - if (getStackInSlot(0).itemID == AlchemicalWizardry.magicianBloodOrb.itemID) + if (getStackInSlot(0).itemID == ModItems.magicianBloodOrb.itemID) { ItemStack item = getStackInSlot(0); @@ -1029,7 +1010,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.lavaCrystal.itemID) + if (getStackInSlot(0).itemID == ModItems.lavaCrystal.itemID) { isActive = true; liquidRequired = 10000; @@ -1037,7 +1018,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui consumptionRate = 20; drainRate = 10; //ItemStack bloodOrb = new ItemStack(AlchemicalWizardry.weakBloodOrb); - resultID = AlchemicalWizardry.activationCrystal.itemID; + resultID = ModItems.activationCrystal.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -1051,7 +1032,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 5; drainRate = 5; - resultID = AlchemicalWizardry.fireScribeTool.itemID; + resultID = ModItems.fireScribeTool.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -1065,22 +1046,22 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 5; drainRate = 5; - resultID = AlchemicalWizardry.airScribeTool.itemID; + resultID = ModItems.airScribeTool.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.reinforcedSlate.itemID) + if (getStackInSlot(0).itemID == ModItems.reinforcedSlate.itemID) { isActive = true; liquidRequired = 7000; canBeFilled = false; consumptionRate = 5; drainRate = 5; - ItemStack bloodOrb = new ItemStack(AlchemicalWizardry.apprenticeBloodOrb); - resultID = AlchemicalWizardry.imbuedSlate.itemID; + ItemStack bloodOrb = new ItemStack(ModItems.apprenticeBloodOrb); + resultID = ModItems.imbuedSlate.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -1097,15 +1078,15 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 5; drainRate = 5; - ItemStack bloodOrb = new ItemStack(AlchemicalWizardry.apprenticeBloodOrb); - resultID = AlchemicalWizardry.apprenticeBloodOrb.itemID; + ItemStack bloodOrb = new ItemStack(ModItems.apprenticeBloodOrb); + resultID = ModItems.apprenticeBloodOrb.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.apprenticeBloodOrb.itemID) + if (getStackInSlot(0).itemID == ModItems.apprenticeBloodOrb.itemID) { ItemStack item = getStackInSlot(0); @@ -1128,7 +1109,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 5; drainRate = 5; - resultID = AlchemicalWizardry.daggerOfSacrifice.itemID; + resultID = ModItems.daggerOfSacrifice.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -1142,22 +1123,22 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 5; drainRate = 5; - resultID = AlchemicalWizardry.alchemyFlask.itemID; - resultDamage = AlchemicalWizardry.alchemyFlask.getMaxDamage(); + resultID = ModItems.alchemyFlask.itemID; + resultDamage = ModItems.alchemyFlask.getMaxDamage(); isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.blankSlate.itemID) + if (getStackInSlot(0).itemID == ModItems.blankSlate.itemID) { isActive = true; liquidRequired = 2000; canBeFilled = false; consumptionRate = 5; drainRate = 5; - ItemStack bloodOrb = new ItemStack(AlchemicalWizardry.apprenticeBloodOrb); - resultID = AlchemicalWizardry.reinforcedSlate.itemID; + ItemStack bloodOrb = new ItemStack(ModItems.apprenticeBloodOrb); + resultID = ModItems.reinforcedSlate.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); @@ -1172,15 +1153,15 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui canBeFilled = false; consumptionRate = 2; drainRate = 1; - ItemStack bloodOrb = new ItemStack(AlchemicalWizardry.weakBloodOrb); - resultID = AlchemicalWizardry.weakBloodOrb.itemID; + ItemStack bloodOrb = new ItemStack(ModItems.weakBloodOrb); + resultID = ModItems.weakBloodOrb.itemID; resultDamage = 0; isResultBlock = false; //setInventorySlotContents(1, bloodOrb); return; } - if (getStackInSlot(0).itemID == AlchemicalWizardry.weakBloodOrb.itemID) + if (getStackInSlot(0).itemID == ModItems.weakBloodOrb.itemID) { ItemStack item = getStackInSlot(0); @@ -1253,16 +1234,16 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui this.isUpgraded = checkUpgrade; this.upgradeLevel = upgradeState; - this.consumptionMultiplier = (float)(0.15 * upgrades.getSpeedUpgrades()); - this.efficiencyMultiplier = (float)Math.pow(0.85, upgrades.getSpeedUpgrades()); - this.sacrificeEfficiencyMultiplier = (float)(0.10 * upgrades.getSacrificeUpgrades()); - this.selfSacrificeEfficiencyMultiplier = (float)(0.10 * upgrades.getSelfSacrificeUpgrades()); - this.capacityMultiplier = (float)(1 + 0.15 * upgrades.getAltarCapacitiveUpgrades()); + this.consumptionMultiplier = (float) (0.15 * upgrades.getSpeedUpgrades()); + this.efficiencyMultiplier = (float) Math.pow(0.85, upgrades.getSpeedUpgrades()); + this.sacrificeEfficiencyMultiplier = (float) (0.10 * upgrades.getSacrificeUpgrades()); + this.selfSacrificeEfficiencyMultiplier = (float) (0.10 * upgrades.getSelfSacrificeUpgrades()); + this.capacityMultiplier = (float) (1 + 0.15 * upgrades.getAltarCapacitiveUpgrades()); //TODO finalize values - this.dislocationMultiplier = (float)(Math.pow(1.2, upgrades.getDisplacementUpgrades())); - this.orbCapacityMultiplier = (float)(1 + 0.02 * upgrades.getOrbCapacitiveUpgrades()); - this.capacity = (int)(FluidContainerRegistry.BUCKET_VOLUME * 10 * capacityMultiplier); - this.bufferCapacity = (int)(FluidContainerRegistry.BUCKET_VOLUME * 1 * capacityMultiplier); + this.dislocationMultiplier = (float) (Math.pow(1.2, upgrades.getDisplacementUpgrades())); + this.orbCapacityMultiplier = (float) (1 + 0.02 * upgrades.getOrbCapacitiveUpgrades()); + this.capacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 10 * capacityMultiplier); + this.bufferCapacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 1 * capacityMultiplier); if (this.fluid.amount > this.capacity) { @@ -1417,6 +1398,6 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui // TODO Auto-generated method stub FluidTank compositeTank = new FluidTank(capacity); compositeTank.setFluid(fluid); - return new FluidTankInfo[] {compositeTank.getInfo()}; + return new FluidTankInfo[]{compositeTank.getInfo()}; } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java index e6eeee82..1f5f5924 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import WayofTime.alchemicalWizardry.common.PacketHandler; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.packet.Packet; -import net.minecraftforge.common.ForgeDirection; public class TEConduit extends TEOrientable { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java index 25e7acd8..d98d65db 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java @@ -53,7 +53,7 @@ public class TEHomHeart extends TileEntity if (tileEntity instanceof TEAltar) { - ItemStack itemStack = ((TEAltar)tileEntity).getStackInSlot(0); + ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); if (itemStack != null) { @@ -70,7 +70,7 @@ public class TEHomHeart extends TileEntity if (tileEntity instanceof TEAltar) { - ItemStack itemStack = ((TEAltar)tileEntity).getStackInSlot(0); + ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); if (itemStack != null) { @@ -87,7 +87,7 @@ public class TEHomHeart extends TileEntity if (tileEntity instanceof TEAltar) { - ItemStack itemStack = ((TEAltar)tileEntity).getStackInSlot(0); + ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); if (itemStack != null) { @@ -104,7 +104,7 @@ public class TEHomHeart extends TileEntity if (tileEntity instanceof TEAltar) { - ItemStack itemStack = ((TEAltar)tileEntity).getStackInSlot(0); + ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); if (itemStack != null) { @@ -128,16 +128,13 @@ public class TEHomHeart extends TileEntity if (blockID == Block.glowStone.blockID) { return 0; - } - else if (blockID == Block.blockRedstone.blockID) + } else if (blockID == Block.blockRedstone.blockID) { return 1; - } - else if (blockID == Block.anvil.blockID) + } else if (blockID == Block.anvil.blockID) { return 2; - } - else if (blockID == Block.glass.blockID) + } else if (blockID == Block.glass.blockID) { return 3; } @@ -146,7 +143,7 @@ public class TEHomHeart extends TileEntity if (tileEntity instanceof TileEntitySkull) { - int skullType = ((TileEntitySkull)tileEntity).getSkullType(); + int skullType = ((TileEntitySkull) tileEntity).getSkullType(); switch (skullType) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeartRenderer.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeartRenderer.java index 0811b630..859a3b9c 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeartRenderer.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeartRenderer.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.item.ItemArmor; import net.minecraft.tileentity.TileEntity; -public class TEHomHeartRenderer extends TileEntitySpecialRenderer +public class TEHomHeartRenderer extends TileEntitySpecialRenderer { @Override public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java index 2a6c2598..c9393d25 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java @@ -1,31 +1,12 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.Iterator; -import java.util.List; - import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.rituals.Rituals; import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.packet.Packet250CustomPayload; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; public class TEMasterStone extends TileEntity { @@ -92,7 +73,7 @@ public class TEMasterStone extends TileEntity } World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner); + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); if (data == null) { @@ -115,7 +96,7 @@ public class TEMasterStone extends TileEntity for (int i = 0; i < 12; i++) { - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); } } @@ -140,7 +121,7 @@ public class TEMasterStone extends TileEntity return; } - int worldTime = (int)(worldObj.getWorldTime() % 24000); + int worldTime = (int) (worldObj.getWorldTime() % 24000); if (worldObj.isRemote) { @@ -150,7 +131,7 @@ public class TEMasterStone extends TileEntity if (worldTime % 100 == 0) { boolean testRunes = Rituals.checkDirectionOfRitualValid(worldObj, xCoord, yCoord, zCoord, currentRitual, direction); - PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); if (!testRunes) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java index d72d8876..0f88106f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java @@ -96,8 +96,7 @@ public class TEPedestal extends TileEntity implements IInventory if (stack.stackSize <= amt) { setInventorySlotContents(slot, null); - } - else + } else { stack = stack.splitStack(amt); @@ -209,8 +208,7 @@ public class TEPedestal extends TileEntity implements IInventory { ItemStack is = new ItemStack(intData[i * 3], intData[i * 3 + 2], intData[i * 3 + 1]); inv[i] = is; - } - else + } else { inv[i] = null; } @@ -220,7 +218,7 @@ public class TEPedestal extends TileEntity implements IInventory public int[] buildIntDataList() { - int [] sortList = new int[1 * 3]; + int[] sortList = new int[1 * 3]; int pos = 0; for (ItemStack is : inv) @@ -230,8 +228,7 @@ public class TEPedestal extends TileEntity implements IInventory sortList[pos++] = is.itemID; sortList[pos++] = is.getItemDamage(); sortList[pos++] = is.stackSize; - } - else + } else { sortList[pos++] = 0; sortList[pos++] = 0; @@ -260,7 +257,7 @@ public class TEPedestal extends TileEntity implements IInventory for (int i = 0; i < 16; i++) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, TEAltar.getParticlePacket(xCoord, yCoord, zCoord, (short)2)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, TEAltar.getParticlePacket(xCoord, yCoord, zCoord, (short) 2)); } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java index 8c33ccd3..1eddba97 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java @@ -1,8 +1,12 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import java.util.ArrayList; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.IDemon; +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.PlinthComponent; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.summoning.SummoningRegistry; +import WayofTime.alchemicalWizardry.common.summoning.SummoningRegistryComponent; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -13,13 +17,9 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.packet.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.oredict.OreDictionary; -import WayofTime.alchemicalWizardry.common.IDemon; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.PlinthComponent; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -import WayofTime.alchemicalWizardry.common.summoning.SummoningRegistry; -import WayofTime.alchemicalWizardry.common.summoning.SummoningRegistryComponent; -import cpw.mods.fml.common.network.PacketDispatcher; + +import java.util.ArrayList; +import java.util.List; public class TEPlinth extends TileEntity implements IInventory { @@ -204,8 +204,7 @@ public class TEPlinth extends TileEntity implements IInventory if (stack.stackSize <= amt) { setInventorySlotContents(slot, null); - } - else + } else { stack = stack.splitStack(amt); @@ -294,7 +293,7 @@ public class TEPlinth extends TileEntity implements IInventory { if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof EnergyBattery) { - int bloodOrbLevel = ((EnergyBattery)getStackInSlot(0).getItem()).getOrbLevel(); + int bloodOrbLevel = ((EnergyBattery) getStackInSlot(0).getItem()).getOrbLevel(); if (SummoningRegistry.isRecipeValid(bloodOrbLevel, composeItemsForRingAndParadigm(1, true), composeItemsForRingAndParadigm(2, true), composeItemsForRingAndParadigm(3, true))) { @@ -305,8 +304,7 @@ public class TEPlinth extends TileEntity implements IInventory ring1Inv = src.getRingRecipeForRing(1); ring2Inv = src.getRingRecipeForRing(2); ring3Inv = src.getRingRecipeForRing(3); - } - else if (SummoningRegistry.isRecipeValid(bloodOrbLevel, composeItemsForRingAndParadigm(1, false), composeItemsForRingAndParadigm(2, false), composeItemsForRingAndParadigm(3, false))) + } else if (SummoningRegistry.isRecipeValid(bloodOrbLevel, composeItemsForRingAndParadigm(1, false), composeItemsForRingAndParadigm(2, false), composeItemsForRingAndParadigm(3, false))) { SummoningRegistryComponent src = SummoningRegistry.getRegistryComponent(bloodOrbLevel, composeItemsForRingAndParadigm(1, false), composeItemsForRingAndParadigm(2, false), composeItemsForRingAndParadigm(3, false)); isActive = true; @@ -315,15 +313,13 @@ public class TEPlinth extends TileEntity implements IInventory ring1Inv = src.getRingRecipeForRing(1); ring2Inv = src.getRingRecipeForRing(2); ring3Inv = src.getRingRecipeForRing(3); - } - else + } else { isActive = false; progress = 0; } } - } - else + } else { if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof EnergyBattery) { @@ -354,23 +350,21 @@ public class TEPlinth extends TileEntity implements IInventory if (itemStack == null) { progress += progressInterval; - } - else + } else { if (this.deleteItemStackInRing(ring, itemStack)) { progress++; } } - } - else + } else { progress++; } if (progress >= progressInterval * 18) { - int bloodOrbLevel = ((EnergyBattery)getStackInSlot(0).getItem()).getOrbLevel(); + int bloodOrbLevel = ((EnergyBattery) getStackInSlot(0).getItem()).getOrbLevel(); EntityLivingBase entity = SummoningRegistry.getEntity(worldObj, bloodOrbLevel, ring1Inv, ring2Inv, ring3Inv); //EntityLivingBase entity = new EntityFallenAngel(worldObj); @@ -382,7 +376,7 @@ public class TEPlinth extends TileEntity implements IInventory if (entity instanceof IDemon) { - ((IDemon)entity).setSummonedConditions(); + ((IDemon) entity).setSummonedConditions(); } worldObj.createExplosion(entity, entity.posX, entity.posY, entity.posZ, 3, false); @@ -414,14 +408,13 @@ public class TEPlinth extends TileEntity implements IInventory if (tileEntity instanceof TEPedestal) { - ((TEPedestal)tileEntity).setInventorySlotContents(0, null); - PacketDispatcher.sendPacketToAllInDimension(((TEPedestal)tileEntity).getDescriptionPacket(), worldObj.provider.dimensionId); + ((TEPedestal) tileEntity).setInventorySlotContents(0, null); + PacketDispatcher.sendPacketToAllInDimension(((TEPedestal) tileEntity).getDescriptionPacket(), worldObj.provider.dimensionId); i++; } } } - } - else + } else { int i = 0; @@ -433,8 +426,8 @@ public class TEPlinth extends TileEntity implements IInventory if (tileEntity instanceof TEPedestal) { - ((TEPedestal)tileEntity).setInventorySlotContents(0, null); - PacketDispatcher.sendPacketToAllInDimension(((TEPedestal)tileEntity).getDescriptionPacket(), worldObj.provider.dimensionId); + ((TEPedestal) tileEntity).setInventorySlotContents(0, null); + PacketDispatcher.sendPacketToAllInDimension(((TEPedestal) tileEntity).getDescriptionPacket(), worldObj.provider.dimensionId); i++; } } @@ -461,7 +454,7 @@ public class TEPlinth extends TileEntity implements IInventory if (tileEntity instanceof TEPedestal) { - ItemStack possibleItem = ((TEPedestal)tileEntity).getStackInSlot(0); + ItemStack possibleItem = ((TEPedestal) tileEntity).getStackInSlot(0); if (possibleItem == null) { @@ -477,8 +470,7 @@ public class TEPlinth extends TileEntity implements IInventory { test = true; } - } - else if (!(itemStack.getItem() instanceof ItemBlock)) + } else if (!(itemStack.getItem() instanceof ItemBlock)) { test = true; } @@ -487,9 +479,9 @@ public class TEPlinth extends TileEntity implements IInventory { if (itemStack.itemID == possibleItem.itemID && (itemStack.getItemDamage() == possibleItem.getItemDamage() || itemStack.getItemDamage() == OreDictionary.WILDCARD_VALUE)) { - ((TEPedestal)tileEntity).decrStackSize(0, 1); - ((TEPedestal)tileEntity).onItemDeletion(); - PacketDispatcher.sendPacketToAllInDimension(((TEPedestal)tileEntity).getDescriptionPacket(), worldObj.provider.dimensionId); + ((TEPedestal) tileEntity).decrStackSize(0, 1); + ((TEPedestal) tileEntity).onItemDeletion(); + PacketDispatcher.sendPacketToAllInDimension(((TEPedestal) tileEntity).getDescriptionPacket(), worldObj.provider.dimensionId); return true; } } @@ -498,8 +490,7 @@ public class TEPlinth extends TileEntity implements IInventory } } } - } - else + } else { int i = 0; @@ -511,7 +502,7 @@ public class TEPlinth extends TileEntity implements IInventory if (tileEntity instanceof TEPedestal) { - ItemStack possibleItem = ((TEPedestal)tileEntity).getStackInSlot(0); + ItemStack possibleItem = ((TEPedestal) tileEntity).getStackInSlot(0); if (possibleItem == null) { @@ -527,8 +518,7 @@ public class TEPlinth extends TileEntity implements IInventory { test = true; } - } - else if (!(itemStack.getItem() instanceof ItemBlock)) + } else if (!(itemStack.getItem() instanceof ItemBlock)) { test = true; } @@ -537,10 +527,10 @@ public class TEPlinth extends TileEntity implements IInventory { if (itemStack.itemID == possibleItem.itemID && (itemStack.getItemDamage() == possibleItem.getItemDamage() || itemStack.getItemDamage() == OreDictionary.WILDCARD_VALUE)) { - ((TEPedestal)tileEntity).decrStackSize(0, 1); - ((TEPedestal)tileEntity).onItemDeletion(); + ((TEPedestal) tileEntity).decrStackSize(0, 1); + ((TEPedestal) tileEntity).onItemDeletion(); //worldObj.markBlockForUpdate(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); - PacketDispatcher.sendPacketToAllInDimension(((TEPedestal)tileEntity).getDescriptionPacket(), worldObj.provider.dimensionId); + PacketDispatcher.sendPacketToAllInDimension(((TEPedestal) tileEntity).getDescriptionPacket(), worldObj.provider.dimensionId); return true; } } @@ -570,13 +560,12 @@ public class TEPlinth extends TileEntity implements IInventory if (tileEntity instanceof TEPedestal) { - composed[i] = ((TEPedestal)tileEntity).getStackInSlot(0); + composed[i] = ((TEPedestal) tileEntity).getStackInSlot(0); i++; } } } - } - else + } else { int i = 0; @@ -588,7 +577,7 @@ public class TEPlinth extends TileEntity implements IInventory if (tileEntity instanceof TEPedestal) { - composed[i] = ((TEPedestal)tileEntity).getStackInSlot(0); + composed[i] = ((TEPedestal) tileEntity).getStackInSlot(0); i++; } } @@ -629,8 +618,7 @@ public class TEPlinth extends TileEntity implements IInventory { ItemStack is = new ItemStack(intData[i * 3], intData[i * 3 + 2], intData[i * 3 + 1]); inv[i] = is; - } - else + } else { inv[i] = null; } @@ -640,7 +628,7 @@ public class TEPlinth extends TileEntity implements IInventory public int[] buildIntDataList() { - int [] sortList = new int[1 * 3]; + int[] sortList = new int[1 * 3]; int pos = 0; for (ItemStack is : inv) @@ -650,8 +638,7 @@ public class TEPlinth extends TileEntity implements IInventory sortList[pos++] = is.itemID; sortList[pos++] = is.getItemDamage(); sortList[pos++] = is.stackSize; - } - else + } else { sortList[pos++] = 0; sortList[pos++] = 0; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java index 62c69f8e..ec7019c8 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java @@ -1,31 +1,13 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.Random; - import WayofTime.alchemicalWizardry.common.PacketHandler; -import cpw.mods.fml.common.network.PacketDispatcher; -import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.packet.Packet; -import net.minecraft.network.packet.Packet250CustomPayload; -import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidEvent; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidTank; public class TESocket extends TileEntity implements IInventory { @@ -112,8 +94,7 @@ public class TESocket extends TileEntity implements IInventory if (stack.stackSize <= amt) { setInventorySlotContents(slot, null); - } - else + } else { stack = stack.splitStack(amt); @@ -225,8 +206,7 @@ public class TESocket extends TileEntity implements IInventory { ItemStack is = new ItemStack(intData[i * 3], intData[i * 3 + 2], intData[i * 3 + 1]); inv[i] = is; - } - else + } else { inv[i] = null; } @@ -236,7 +216,7 @@ public class TESocket extends TileEntity implements IInventory public int[] buildIntDataList() { - int [] sortList = new int[1 * 3]; + int[] sortList = new int[1 * 3]; int pos = 0; for (ItemStack is : inv) @@ -246,8 +226,7 @@ public class TESocket extends TileEntity implements IInventory sortList[pos++] = is.itemID; sortList[pos++] = is.getItemDamage(); sortList[pos++] = is.stackSize; - } - else + } else { sortList[pos++] = 0; sortList[pos++] = 0; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java index dac26394..2a360796 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java @@ -1,8 +1,9 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import java.util.Iterator; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.PacketHandler; +import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -13,10 +14,9 @@ import net.minecraft.network.packet.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; + +import java.util.Iterator; +import java.util.List; public class TETeleposer extends TileEntity implements IInventory { @@ -107,8 +107,7 @@ public class TETeleposer extends TileEntity implements IInventory if (stack.stackSize <= amt) { setInventorySlotContents(slot, null); - } - else + } else { stack = stack.splitStack(amt); @@ -199,15 +198,15 @@ public class TETeleposer extends TileEntity implements IInventory { ItemStack focus = this.getStackInSlot(0); - if (focus != null && focus.getItem()instanceof TelepositionFocus) + if (focus != null && focus.getItem() instanceof TelepositionFocus) { - TelepositionFocus focusItem = (TelepositionFocus)(focus.getItem()); + TelepositionFocus focusItem = (TelepositionFocus) (focus.getItem()); int xf = focusItem.xCoord(focus); int yf = focusItem.yCoord(focus); int zf = focusItem.zCoord(focus); World worldF = focusItem.getWorld(focus); - int damage = (int)(0.5f * Math.sqrt((xCoord - xf) * (xCoord - xf) + (yCoord - yf + 1) * (yCoord - yf + 1) + (zCoord - zf) * (zCoord - zf))); - int focusLevel = ((TelepositionFocus)focusItem).getFocusLevel(); + int damage = (int) (0.5f * Math.sqrt((xCoord - xf) * (xCoord - xf) + (yCoord - yf + 1) * (yCoord - yf + 1) + (zCoord - zf) * (zCoord - zf))); + int focusLevel = ((TelepositionFocus) focusItem).getFocusLevel(); int transportCount = 0; int entityCount = 0; @@ -215,15 +214,15 @@ public class TETeleposer extends TileEntity implements IInventory { //Prime the teleportation int d0 = focusLevel - 1; - AxisAlignedBB axisalignedbb1 = AxisAlignedBB.getAABBPool().getAABB((double)this.xCoord, (double)this.yCoord + d0 + 1, (double)this.zCoord, (double)(this.xCoord + 1), (double)(this.yCoord + 2 + d0), (double)(this.zCoord + 1)).expand(d0, d0, d0); - axisalignedbb1.maxY = Math.min((double)this.worldObj.getHeight(), this.yCoord + 2 + d0 + d0); + AxisAlignedBB axisalignedbb1 = AxisAlignedBB.getAABBPool().getAABB((double) this.xCoord, (double) this.yCoord + d0 + 1, (double) this.zCoord, (double) (this.xCoord + 1), (double) (this.yCoord + 2 + d0), (double) (this.zCoord + 1)).expand(d0, d0, d0); + axisalignedbb1.maxY = Math.min((double) this.worldObj.getHeight(), this.yCoord + 2 + d0 + d0); List list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb1); Iterator iterator1 = list1.iterator(); EntityLivingBase entityplayer1; while (iterator1.hasNext()) { - entityplayer1 = (EntityLivingBase)iterator1.next(); + entityplayer1 = (EntityLivingBase) iterator1.next(); entityCount++; } @@ -236,14 +235,14 @@ public class TETeleposer extends TileEntity implements IInventory while (iterator2.hasNext()) { - entityplayer2 = (EntityLivingBase)iterator2.next(); + entityplayer2 = (EntityLivingBase) iterator2.next(); entityCount++; } if (EnergyItems.canSyphonInContainer(focus, damage * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) + damage * entityCount)) { for (int k = 0; k <= (focusLevel * 2 - 2); k++) - //for(int k=(focusLevel*2-1);k>=0;k--) + //for(int k=(focusLevel*2-1);k>=0;k--) { for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++) { @@ -274,14 +273,14 @@ public class TETeleposer extends TileEntity implements IInventory while (iterator1.hasNext()) { - entityplayer1 = (EntityLivingBase)iterator1.next(); + entityplayer1 = (EntityLivingBase) iterator1.next(); entityplayer1.worldObj = worldF; entityplayer1.setPositionAndUpdate(entityplayer1.posX - this.xCoord + xf, entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ - this.zCoord + zf); } while (iterator2.hasNext()) { - entityplayer2 = (EntityLivingBase)iterator2.next(); + entityplayer2 = (EntityLivingBase) iterator2.next(); entityplayer2.worldObj = worldF; entityplayer2.setPositionAndUpdate(entityplayer2.posX + this.xCoord - xf, entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ + this.zCoord - zf); } @@ -325,8 +324,7 @@ public class TETeleposer extends TileEntity implements IInventory { ItemStack is = new ItemStack(intData[i * 3], intData[i * 3 + 2], intData[i * 3 + 1]); inv[i] = is; - } - else + } else { inv[i] = null; } @@ -336,7 +334,7 @@ public class TETeleposer extends TileEntity implements IInventory public int[] buildIntDataList() { - int [] sortList = new int[1 * 3]; + int[] sortList = new int[1 * 3]; int pos = 0; for (ItemStack is : inv) @@ -346,8 +344,7 @@ public class TETeleposer extends TileEntity implements IInventory sortList[pos++] = is.itemID; sortList[pos++] = is.getItemDamage(); sortList[pos++] = is.stackSize; - } - else + } else { sortList[pos++] = 0; sortList[pos++] = 0; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java index 162a2d91..a2c3cb6b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.IOException; - +import WayofTime.alchemicalWizardry.common.*; +import WayofTime.alchemicalWizardry.common.alchemy.AlchemicalPotionCreationHandler; +import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; +import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemBlock; @@ -13,16 +15,10 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet250CustomPayload; import net.minecraft.tileentity.TileEntity; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.IBindingAgent; -import WayofTime.alchemicalWizardry.common.ICatalyst; -import WayofTime.alchemicalWizardry.common.IFillingAgent; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.alchemy.AlchemicalPotionCreationHandler; -import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; -import cpw.mods.fml.common.network.PacketDispatcher; + +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; public class TEWritingTable extends TileEntity implements IInventory { @@ -69,8 +65,7 @@ public class TEWritingTable extends TileEntity implements IInventory if (stack.stackSize <= amt) { setInventorySlotContents(slot, null); - } - else + } else { stack = stack.splitStack(amt); @@ -110,10 +105,14 @@ public class TEWritingTable extends TileEntity implements IInventory } @Override - public void openChest() {} + public void openChest() + { + } @Override - public void closeChest() {} + public void closeChest() + { + } @Override public void readFromNBT(NBTTagCompound tagCompound) @@ -197,8 +196,7 @@ public class TEWritingTable extends TileEntity implements IInventory dos.writeDouble(y); dos.writeDouble(z); dos.writeShort(particleType); - } - catch (IOException e) + } catch (IOException e) { e.printStackTrace(); } @@ -221,8 +219,7 @@ public class TEWritingTable extends TileEntity implements IInventory { ItemStack is = new ItemStack(intData[i * 3], intData[i * 3 + 2], intData[i * 3 + 1]); inv[i] = is; - } - else + } else { inv[i] = null; } @@ -232,7 +229,7 @@ public class TEWritingTable extends TileEntity implements IInventory public int[] buildIntDataList() { - int [] sortList = new int[7 * 3]; + int[] sortList = new int[7 * 3]; int pos = 0; for (ItemStack is : inv) @@ -242,8 +239,7 @@ public class TEWritingTable extends TileEntity implements IInventory sortList[pos++] = is.itemID; sortList[pos++] = is.getItemDamage(); sortList[pos++] = is.stackSize; - } - else + } else { sortList[pos++] = 0; sortList[pos++] = 0; @@ -268,7 +264,7 @@ public class TEWritingTable extends TileEntity implements IInventory public boolean isRecipeValid() { - return(getResultingItemStack() != null); + return (getResultingItemStack() != null); } public int getAmountNeeded(ItemStack bloodOrb) @@ -288,8 +284,7 @@ public class TEWritingTable extends TileEntity implements IInventory if (getPotionFlaskPosition() != -1) { return true; - } - else + } else { return false; } @@ -299,7 +294,7 @@ public class TEWritingTable extends TileEntity implements IInventory { for (int i = 1; i <= 5; i++) { - if (inv[i] != null && !(inv[i].getItem() instanceof ItemBlock) && inv[i].itemID == AlchemicalWizardry.alchemyFlask.itemID) + if (inv[i] != null && !(inv[i].getItem() instanceof ItemBlock) && inv[i].itemID == ModItems.alchemyFlask.itemID) { return i; } @@ -313,8 +308,7 @@ public class TEWritingTable extends TileEntity implements IInventory if (getRegisteredPotionIngredientPosition() != -1) { return true; - } - else + } else { return false; } @@ -422,7 +416,7 @@ public class TEWritingTable extends TileEntity implements IInventory { for (int i = 0; i < 5; i++) { - if (inv[i + 1] != null && inv[i + 1].itemID == AlchemicalWizardry.blankSlate.itemID) + if (inv[i + 1] != null && inv[i + 1].itemID == ModItems.blankSlate.itemID) { return i + 1; } @@ -459,7 +453,7 @@ public class TEWritingTable extends TileEntity implements IInventory if (worldTime % 4 == 0) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); } if (progress >= progressNeeded) @@ -481,8 +475,8 @@ public class TEWritingTable extends TileEntity implements IInventory } int potionID = AlchemicalPotionCreationHandler.getPotionIDForStack(ingredientStack); - int catalystLevel = ((ICatalyst)catalystStack.getItem()).getCatalystLevel(); - boolean isConcentration = ((ICatalyst)catalystStack.getItem()).isConcentration(); + int catalystLevel = ((ICatalyst) catalystStack.getItem()).getCatalystLevel(); + boolean isConcentration = ((ICatalyst) catalystStack.getItem()).isConcentration(); if (potionID == -1 || catalystLevel < 0) { @@ -498,11 +492,10 @@ public class TEWritingTable extends TileEntity implements IInventory if (isConcentration) { - ((AlchemyFlask)flaskStack.getItem()).setConcentrationOfPotion(flaskStack, potionID, catalystLevel); - } - else + ((AlchemyFlask) flaskStack.getItem()).setConcentrationOfPotion(flaskStack, potionID, catalystLevel); + } else { - ((AlchemyFlask)flaskStack.getItem()).setDurationFactorOfPotion(flaskStack, potionID, catalystLevel); + ((AlchemyFlask) flaskStack.getItem()).setDurationFactorOfPotion(flaskStack, potionID, catalystLevel); } //((AlchemyFlask)flaskStack.getItem()).setConcentrationOfPotion(flaskStack, Potion.regeneration.id, 2); @@ -518,8 +511,7 @@ public class TEWritingTable extends TileEntity implements IInventory } } } - } - else if (containsBindingAgent()) + } else if (containsBindingAgent()) { if (getStackInSlot(6) == null) { @@ -527,7 +519,7 @@ public class TEWritingTable extends TileEntity implements IInventory if (worldTime % 4 == 0) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); } if (progress >= progressNeeded) @@ -548,10 +540,10 @@ public class TEWritingTable extends TileEntity implements IInventory return; } - int potionEffectNumber = ((AlchemyFlask)flaskStack.getItem()).getNumberOfPotionEffects(flaskStack); + int potionEffectNumber = ((AlchemyFlask) flaskStack.getItem()).getNumberOfPotionEffects(flaskStack); int potionID = AlchemicalPotionCreationHandler.getPotionIDForStack(ingredientStack); int tickDuration = AlchemicalPotionCreationHandler.getPotionTickDurationForStack(ingredientStack); - float successChance = ((IBindingAgent)agentStack.getItem()).getSuccessRateForPotionNumber(potionEffectNumber); + float successChance = ((IBindingAgent) agentStack.getItem()).getSuccessRateForPotionNumber(potionEffectNumber); //boolean isConcentration = ((ICatalyst)catalystStack.getItem()).isConcentration(); if (potionID == -1) @@ -566,15 +558,14 @@ public class TEWritingTable extends TileEntity implements IInventory return; } - ((AlchemyFlask)flaskStack.getItem()).addPotionEffect(flaskStack, potionID, tickDuration); + ((AlchemyFlask) flaskStack.getItem()).addPotionEffect(flaskStack, potionID, tickDuration); //((AlchemyFlask)flaskStack.getItem()).addPotionEffect(flaskStack, Potion.regeneration.id, 1000); if (successChance > worldObj.rand.nextFloat()) { this.setInventorySlotContents(6, flaskStack); - } - else + } else { worldObj.createExplosion(null, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 2, false); } @@ -591,8 +582,7 @@ public class TEWritingTable extends TileEntity implements IInventory } } } - } - else if (this.containsBlankSlate() && this.containsPotionFlask()) + } else if (this.containsBlankSlate() && this.containsPotionFlask()) { if (getStackInSlot(6) == null) { @@ -600,7 +590,7 @@ public class TEWritingTable extends TileEntity implements IInventory if (worldTime % 4 == 0) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); } if (progress >= progressNeeded) @@ -622,7 +612,7 @@ public class TEWritingTable extends TileEntity implements IInventory } //boolean isConcentration = ((ICatalyst)catalystStack.getItem()).isConcentration(); - ((AlchemyFlask)flaskStack.getItem()).setIsPotionThrowable(true, flaskStack); + ((AlchemyFlask) flaskStack.getItem()).setIsPotionThrowable(true, flaskStack); //((AlchemyFlask)flaskStack.getItem()).addPotionEffect(flaskStack, Potion.regeneration.id, 1000); //if(successChance>worldObj.rand.nextFloat()) this.setInventorySlotContents(6, flaskStack); @@ -637,8 +627,7 @@ public class TEWritingTable extends TileEntity implements IInventory } } } - } - else if (this.containsFillingAgent() && this.containsPotionFlask()) + } else if (this.containsFillingAgent() && this.containsPotionFlask()) { //TODO if (getStackInSlot(6) == null) @@ -647,7 +636,7 @@ public class TEWritingTable extends TileEntity implements IInventory if (worldTime % 4 == 0) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); } if (progress >= progressNeeded) @@ -669,8 +658,8 @@ public class TEWritingTable extends TileEntity implements IInventory } //boolean isConcentration = ((ICatalyst)catalystStack.getItem()).isConcentration(); - int potionEffects = ((AlchemyFlask)flaskStack.getItem()).getNumberOfPotionEffects(flaskStack); - int potionFillAmount = ((IFillingAgent)fillingAgent.getItem()).getFilledAmountForPotionNumber(potionEffects); + int potionEffects = ((AlchemyFlask) flaskStack.getItem()).getNumberOfPotionEffects(flaskStack); + int potionFillAmount = ((IFillingAgent) fillingAgent.getItem()).getFilledAmountForPotionNumber(potionEffects); flaskStack.setItemDamage(Math.max(0, flaskStack.getItemDamage() - potionFillAmount)); //((AlchemyFlask)flaskStack.getItem()).addPotionEffect(flaskStack, Potion.regeneration.id, 1000); //if(successChance>worldObj.rand.nextFloat()) @@ -686,8 +675,7 @@ public class TEWritingTable extends TileEntity implements IInventory } } } - } - else + } else { if (!isRecipeValid()) { @@ -710,7 +698,7 @@ public class TEWritingTable extends TileEntity implements IInventory { if (worldTime % 4 == 0) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); } if (!EnergyItems.syphonWhileInContainer(getStackInSlot(0), amountUsed)) @@ -735,12 +723,11 @@ public class TEWritingTable extends TileEntity implements IInventory worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } - } - else if (getStackInSlot(6).getItem().itemID == getResultingItemStack().itemID && getResultingItemStack().stackSize <= (getStackInSlot(6).getMaxStackSize() - getStackInSlot(6).stackSize)) + } else if (getStackInSlot(6).getItem().itemID == getResultingItemStack().itemID && getResultingItemStack().stackSize <= (getStackInSlot(6).getMaxStackSize() - getStackInSlot(6).stackSize)) { if (worldTime % 4 == 0) { - PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short)1)); + PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 1)); } if (!EnergyItems.syphonWhileInContainer(getStackInSlot(0), amountUsed)) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java index d9b27cfd..9f926427 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerAltar.java @@ -25,6 +25,7 @@ public class ContainerAltar extends Container bindPlayerInventory(inventoryPlayer); } + @Override public boolean canInteractWith(EntityPlayer entityplayer) { @@ -38,7 +39,7 @@ public class ContainerAltar extends Container for (int j = 0; j < 9; j++) { addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, - 8 + j * 18, 84 + i * 18)); + 8 + j * 18, 84 + i * 18)); } } @@ -47,6 +48,7 @@ public class ContainerAltar extends Container addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142)); } } + @Override public ItemStack transferStackInSlot(EntityPlayer player, int slot) { @@ -76,8 +78,7 @@ public class ContainerAltar extends Container if (stackInSlot.stackSize == 0) { slotObject.putStack(null); - } - else + } else { slotObject.onSlotChanged(); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java index 6ad58683..09104284 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerTeleposer.java @@ -88,8 +88,7 @@ public class ContainerTeleposer extends Container if (stackInSlot.stackSize == 0) { slotObject.putStack(null); - } - else + } else { slotObject.onSlotChanged(); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java index f767631b..aaf63b67 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java @@ -88,8 +88,7 @@ public class ContainerWritingTable extends Container if (stackInSlot.stackSize == 0) { slotObject.putStack(null); - } - else + } else { slotObject.onSlotChanged(); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java index b13f6511..09a8f66f 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java @@ -4,10 +4,10 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; +import cpw.mods.fml.common.network.IGuiHandler; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import cpw.mods.fml.common.network.IGuiHandler; public class GuiHandler implements IGuiHandler { @@ -62,7 +62,7 @@ public class GuiHandler implements IGuiHandler if (tileEntity instanceof TETeleposer) { - return new GuiTeleposer(player.inventory, (TETeleposer)tileEntity); + return new GuiTeleposer(player.inventory, (TETeleposer) tileEntity); } break; diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java index 95051648..230037b0 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java @@ -1,16 +1,14 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; +import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; +import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; import net.minecraft.client.gui.inventory.GuiBrewingStand; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; - public class GuiTeleposer extends GuiContainer { public GuiTeleposer(InventoryPlayer inventoryPlayer, TETeleposer tileEntity) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java index 8a9b51c5..1157e4a1 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java @@ -1,16 +1,14 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; import net.minecraft.client.gui.inventory.GuiBrewingStand; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; - public class GuiWritingTable extends GuiContainer { public GuiWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable tileEntity) diff --git a/BM_src/thaumcraft/api/IGoggles.java b/BM_src/thaumcraft/api/IGoggles.java index 3ccf7000..a66a8238 100644 --- a/BM_src/thaumcraft/api/IGoggles.java +++ b/BM_src/thaumcraft/api/IGoggles.java @@ -4,12 +4,10 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; /** - * * @author Azanor - * - * Equipped head slot items that extend this class will be able to perform most functions that - * goggles of revealing can apart from view nodes which is handled by IRevealer. - * + *

+ * Equipped head slot items that extend this class will be able to perform most functions that + * goggles of revealing can apart from view nodes which is handled by IRevealer. */ public interface IGoggles diff --git a/BM_src/thaumcraft/api/IRepairable.java b/BM_src/thaumcraft/api/IRepairable.java index f366cf04..59788069 100644 --- a/BM_src/thaumcraft/api/IRepairable.java +++ b/BM_src/thaumcraft/api/IRepairable.java @@ -2,8 +2,8 @@ package thaumcraft.api; /** * @author Azanor - * Items, armor and tools with this interface can receive the Repair enchantment. - * Repairs 1 point of durability every 10 seconds (2 for repair II) + * Items, armor and tools with this interface can receive the Repair enchantment. + * Repairs 1 point of durability every 10 seconds (2 for repair II) */ public interface IRepairable { diff --git a/BM_src/thaumcraft/api/IRepairableExtended.java b/BM_src/thaumcraft/api/IRepairableExtended.java index 69f78b82..1922b18b 100644 --- a/BM_src/thaumcraft/api/IRepairableExtended.java +++ b/BM_src/thaumcraft/api/IRepairableExtended.java @@ -5,8 +5,8 @@ import net.minecraft.item.ItemStack; /** * @author Azanor - * Items, armor and tools with this interface can receive the Repair enchantment. - * Repairs 1 point of durability every 10 seconds (2 for repair II) + * Items, armor and tools with this interface can receive the Repair enchantment. + * Repairs 1 point of durability every 10 seconds (2 for repair II) */ public interface IRepairableExtended extends IRepairable { diff --git a/BM_src/thaumcraft/api/IVisDiscounter.java b/BM_src/thaumcraft/api/IVisDiscounter.java index 105b6c32..584cb289 100644 --- a/BM_src/thaumcraft/api/IVisDiscounter.java +++ b/BM_src/thaumcraft/api/IVisDiscounter.java @@ -2,9 +2,9 @@ package thaumcraft.api; /** * @author Azanor - * ItemArmor with this interface will grant a discount to the vis cost of actions the wearer performs with casting wands. - * The amount returned is the percentage by which the cost is discounted. There is a built-int max discount of 50%, but - * individual items really shouldn't have a discount more than 5% + * ItemArmor with this interface will grant a discount to the vis cost of actions the wearer performs with casting wands. + * The amount returned is the percentage by which the cost is discounted. There is a built-int max discount of 50%, but + * individual items really shouldn't have a discount more than 5% */ public interface IVisDiscounter { diff --git a/BM_src/thaumcraft/api/ItemApi.java b/BM_src/thaumcraft/api/ItemApi.java index 04fdfd5d..5043ab45 100644 --- a/BM_src/thaumcraft/api/ItemApi.java +++ b/BM_src/thaumcraft/api/ItemApi.java @@ -1,17 +1,16 @@ package thaumcraft.api; +import cpw.mods.fml.common.FMLLog; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import cpw.mods.fml.common.FMLLog; /** * @author Azanor - * - * This is used to gain access to the items in my mod. - * I only give some examples and it will probably still - * require a bit of work for you to get hold of everything you need. - * + *

+ * This is used to gain access to the items in my mod. + * I only give some examples and it will probably still + * require a bit of work for you to get hold of everything you need. */ public class ItemApi { @@ -27,13 +26,11 @@ public class ItemApi if (obj instanceof Item) { item = new ItemStack((Item) obj, 1, meta); - } - else if (obj instanceof ItemStack) + } else if (obj instanceof ItemStack) { item = (ItemStack) obj; } - } - catch (Exception ex) + } catch (Exception ex) { FMLLog.warning("[Thaumcraft] Could not retrieve item identified by: " + itemString); } @@ -53,13 +50,11 @@ public class ItemApi if (obj instanceof Block) { item = new ItemStack((Block) obj, 1, meta); - } - else if (obj instanceof ItemStack) + } else if (obj instanceof ItemStack) { item = (ItemStack) obj; } - } - catch (Exception ex) + } catch (Exception ex) { FMLLog.warning("[Thaumcraft] Could not retrieve block identified by: " + itemString); } diff --git a/BM_src/thaumcraft/api/ThaumcraftApi.java b/BM_src/thaumcraft/api/ThaumcraftApi.java index 8e616a8b..721b91c9 100644 --- a/BM_src/thaumcraft/api/ThaumcraftApi.java +++ b/BM_src/thaumcraft/api/ThaumcraftApi.java @@ -1,11 +1,5 @@ package thaumcraft.api; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ConcurrentHashMap; - import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; @@ -16,31 +10,28 @@ import net.minecraftforge.common.EnumHelper; import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.crafting.CrucibleRecipe; -import thaumcraft.api.crafting.InfusionEnchantmentRecipe; -import thaumcraft.api.crafting.InfusionRecipe; -import thaumcraft.api.crafting.ShapedArcaneRecipe; -import thaumcraft.api.crafting.ShapelessArcaneRecipe; -import thaumcraft.api.research.IScanEventHandler; -import thaumcraft.api.research.ResearchCategories; -import thaumcraft.api.research.ResearchCategoryList; -import thaumcraft.api.research.ResearchItem; -import thaumcraft.api.research.ResearchPage; +import thaumcraft.api.crafting.*; +import thaumcraft.api.research.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; /** * @author Azanor - * - * - * IMPORTANT: If you are adding your own aspects to items it is a good idea to do it AFTER Thaumcraft adds its aspects, otherwise odd things may happen. - * + *

+ *

+ * IMPORTANT: If you are adding your own aspects to items it is a good idea to do it AFTER Thaumcraft adds its aspects, otherwise odd things may happen. */ public class ThaumcraftApi { //Materials public static EnumToolMaterial toolMatThaumium = EnumHelper.addToolMaterial("THAUMIUM", 3, 400, 7F, 2, 22); public static EnumToolMaterial toolMatElemental = EnumHelper.addToolMaterial("THAUMIUM_ELEMENTAL", 3, 1500, 10F, 3, 18); - public static EnumArmorMaterial armorMatThaumium = EnumHelper.addArmorMaterial("THAUMIUM", 25, new int[] { 2, 6, 5, 2 }, 25); - public static EnumArmorMaterial armorMatSpecial = EnumHelper.addArmorMaterial("SPECIAL", 25, new int[] { 1, 3, 2, 1 }, 25); + public static EnumArmorMaterial armorMatThaumium = EnumHelper.addArmorMaterial("THAUMIUM", 25, new int[]{2, 6, 5, 2}, 25); + public static EnumArmorMaterial armorMatSpecial = EnumHelper.addArmorMaterial("SPECIAL", 25, new int[]{1, 3, 2, 1}, 25); //Enchantment references public static int enchantFrugal; @@ -59,6 +50,7 @@ public class ThaumcraftApi //RESEARCH///////////////////////////////////////// public static ArrayList scanEventhandlers = new ArrayList(); public static ArrayList scanEntities = new ArrayList(); + public static class EntityTags { public EntityTags(String entityName, NBTBase[] nbts, AspectList aspects) @@ -67,6 +59,7 @@ public class ThaumcraftApi this.nbts = nbts; this.aspects = aspects; } + public String entityName; public NBTBase[] nbts; public AspectList aspects; @@ -74,6 +67,7 @@ public class ThaumcraftApi /** * not really working atm, so ignore it for now + * * @param scanEventHandler */ public static void registerScanEventhandler(IScanEventHandler scanEventHandler) @@ -84,12 +78,13 @@ public class ThaumcraftApi /** * This is used to add aspects to entities which you can then scan using a thaumometer. * Also used to calculate vis drops from mobs. + * * @param entityName * @param aspects - * @param nbt you can specify certain nbt keys and their values - * to differentiate between mobs.
For example the normal and wither skeleton: - *
ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 5)); - *
ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 8), new NBTTagByte("SkeletonType",(byte) 1)); + * @param nbt you can specify certain nbt keys and their values + * to differentiate between mobs.
For example the normal and wither skeleton: + *
ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 5)); + *
ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 8), new NBTTagByte("SkeletonType",(byte) 1)); */ public static void registerEntityTag(String entityName, AspectList aspects, NBTBase... nbt) { @@ -98,24 +93,26 @@ public class ThaumcraftApi //RECIPES///////////////////////////////////////// private static ArrayList craftingRecipes = new ArrayList(); - private static HashMap smeltingBonus = new HashMap(); + private static HashMap smeltingBonus = new HashMap(); private static ArrayList smeltingBonusExlusion = new ArrayList(); /** * This method is used to determine what bonus items are generated when the infernal furnace smelts items - * @param in The result (not input) of the smelting operation. e.g. new ItemStack(ingotGold) + * + * @param in The result (not input) of the smelting operation. e.g. new ItemStack(ingotGold) * @param out The bonus item that can be produced from the smelting operation e.g. new ItemStack(nuggetGold,0,0). - * Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced. + * Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced. */ public static void addSmeltingBonus(ItemStack in, ItemStack out) { smeltingBonus.put( - Arrays.asList(in.itemID, in.getItemDamage()), - new ItemStack(out.itemID, 0, out.getItemDamage())); + Arrays.asList(in.itemID, in.getItemDamage()), + new ItemStack(out.itemID, 0, out.getItemDamage())); } /** * Returns the bonus item produced from a smelting operation in the infernal furnace + * * @param in The result of the smelting operation. e.g. new ItemStack(ingotGold) * @return the The bonus item that can be produced */ @@ -127,12 +124,13 @@ public class ThaumcraftApi /** * Excludes specific items from producing bonus items when they are smelted in the infernal furnace, even * if their smelt result would normally produce a bonus item. - * @param in The item to be smelted that should never produce a bonus item (e.g. the various macerated dusts form IC2) - * Even though they produce gold, iron, etc. ingots, they should NOT produce bonus nuggets as well. * - * Smelting exclusions can also be done via the FMLInterModComms in your @Mod.Init method using "smeltBonusExclude" - * Example for vanilla iron: - * FMLInterModComms.sendMessage("Thaumcraft", "smeltBonusExclude", new ItemStack(Item.ingotIron)); + * @param in The item to be smelted that should never produce a bonus item (e.g. the various macerated dusts form IC2) + * Even though they produce gold, iron, etc. ingots, they should NOT produce bonus nuggets as well. + *

+ * Smelting exclusions can also be done via the FMLInterModComms in your @Mod.Init method using "smeltBonusExclude" + * Example for vanilla iron: + * FMLInterModComms.sendMessage("Thaumcraft", "smeltBonusExclude", new ItemStack(Item.ingotIron)); */ public static void addSmeltingBonusExclusion(ItemStack in) { @@ -141,6 +139,7 @@ public class ThaumcraftApi /** * Sees if an item is allowed to produce bonus items when smelted in the infernal furnace + * * @param in The item you wish to check * @return true or false */ @@ -156,11 +155,11 @@ public class ThaumcraftApi /** * @param research the research key required for this recipe to work. Leave blank if it will work without research - * @param result the recipe output - * @param aspects the vis cost per aspect. - * @param recipe The recipe. Format is exactly the same as vanilla recipes. Input itemstacks are NBT sensitive. + * @param result the recipe output + * @param aspects the vis cost per aspect. + * @param recipe The recipe. Format is exactly the same as vanilla recipes. Input itemstacks are NBT sensitive. */ - public static ShapedArcaneRecipe addArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object ... recipe) + public static ShapedArcaneRecipe addArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) { ShapedArcaneRecipe r = new ShapedArcaneRecipe(research, result, aspects, recipe); craftingRecipes.add(r); @@ -169,11 +168,11 @@ public class ThaumcraftApi /** * @param research the research key required for this recipe to work. Leave blank if it will work without research - * @param result the recipe output - * @param aspects the vis cost per aspect - * @param recipe The recipe. Format is exactly the same as vanilla shapeless recipes. Input itemstacks are NBT sensitive. + * @param result the recipe output + * @param aspects the vis cost per aspect + * @param recipe The recipe. Format is exactly the same as vanilla shapeless recipes. Input itemstacks are NBT sensitive. */ - public static ShapelessArcaneRecipe addShapelessArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object ... recipe) + public static ShapelessArcaneRecipe addShapelessArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) { ShapelessArcaneRecipe r = new ShapelessArcaneRecipe(research, result, aspects, recipe); craftingRecipes.add(r); @@ -181,15 +180,14 @@ public class ThaumcraftApi } /** - * @param research the research key required for this recipe to work. Leave blank if it will work without research - * @param result the recipe output. It can either be an itemstack or an nbt compound tag that will be added to the central item + * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param result the recipe output. It can either be an itemstack or an nbt compound tag that will be added to the central item * @param instability a number that represents the N in 1000 chance for the infusion altar to spawn an - * instability effect each second while the crafting is in progress - * @param aspects the essentia cost per aspect. - * @param aspects input the central item to be infused - * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. - * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. - * + * instability effect each second while the crafting is in progress + * @param aspects the essentia cost per aspect. + * @param aspects input the central item to be infused + * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. + * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. */ public static InfusionRecipe addInfusionCraftingRecipe(String research, Object result, int instability, AspectList aspects, ItemStack input, ItemStack[] recipe) { @@ -204,14 +202,13 @@ public class ThaumcraftApi } /** - * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param research the research key required for this recipe to work. Leave blank if it will work without research * @param enchantment the enchantment that will be applied to the item * @param instability a number that represents the N in 1000 chance for the infusion altar to spawn an - * instability effect each second while the crafting is in progress - * @param aspects the essentia cost per aspect. - * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. - * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. - * + * instability effect each second while the crafting is in progress + * @param aspects the essentia cost per aspect. + * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. + * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. */ public static InfusionEnchantmentRecipe addInfusionEnchantmentRecipe(String research, Enchantment enchantment, int instability, AspectList aspects, ItemStack[] recipe) { @@ -226,15 +223,15 @@ public class ThaumcraftApi */ public static InfusionRecipe getInfusionRecipe(ItemStack res) { - for (Object r: getCraftingRecipes()) + for (Object r : getCraftingRecipes()) { if (r instanceof InfusionRecipe) { - if (((InfusionRecipe)r).recipeOutput instanceof ItemStack) + if (((InfusionRecipe) r).recipeOutput instanceof ItemStack) { - if (((ItemStack)((InfusionRecipe)r).recipeOutput).isItemEqual(res)) + if (((ItemStack) ((InfusionRecipe) r).recipeOutput).isItemEqual(res)) { - return (InfusionRecipe)r; + return (InfusionRecipe) r; } } } @@ -244,10 +241,10 @@ public class ThaumcraftApi } /** - * @param key the research key required for this recipe to work. + * @param key the research key required for this recipe to work. * @param result the output result - * @param cost the vis cost - * @param tags the aspects required to craft this + * @param cost the vis cost + * @param tags the aspects required to craft this */ public static CrucibleRecipe addCrucibleRecipe(String key, ItemStack result, Object catalyst, AspectList tags) { @@ -262,13 +259,13 @@ public class ThaumcraftApi */ public static CrucibleRecipe getCrucibleRecipe(ItemStack stack) { - for (Object r: getCraftingRecipes()) + for (Object r : getCraftingRecipes()) { if (r instanceof CrucibleRecipe) { - if (((CrucibleRecipe)r).recipeOutput.isItemEqual(stack)) + if (((CrucibleRecipe) r).recipeOutput.isItemEqual(stack)) { - return (CrucibleRecipe)r; + return (CrucibleRecipe) r; } } } @@ -278,13 +275,15 @@ public class ThaumcraftApi /** * Used by the thaumonomicon drilldown feature. + * * @param stack the item * @return the thaumcraft recipe key that produces that item. */ - private static HashMap keyCache = new HashMap(); + private static HashMap keyCache = new HashMap(); + public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) { - int[] key = new int[] {stack.itemID, stack.getItemDamage()}; + int[] key = new int[]{stack.itemID, stack.getItemDamage()}; if (keyCache.containsKey(key)) { @@ -293,19 +292,18 @@ public class ThaumcraftApi return null; } - if (ThaumcraftApiHelper.isResearchComplete(player.username, (String)(keyCache.get(key))[0])) + if (ThaumcraftApiHelper.isResearchComplete(player.username, (String) (keyCache.get(key))[0])) { return keyCache.get(key); - } - else + } else { return null; } } - for (ResearchCategoryList rcl: ResearchCategories.researchCategories.values()) + for (ResearchCategoryList rcl : ResearchCategories.researchCategories.values()) { - for (ResearchItem ri: rcl.research.values()) + for (ResearchItem ri : rcl.research.values()) { if (ri.getPages() == null) { @@ -318,10 +316,10 @@ public class ThaumcraftApi if (page.recipeOutput != null && stack != null && page.recipeOutput.isItemEqual(stack)) { - keyCache.put(key, new Object[] {ri.key, a}); + keyCache.put(key, new Object[]{ri.key, a}); if (ThaumcraftApiHelper.isResearchComplete(player.username, ri.key)) - return new Object[] {ri.key, a}; + return new Object[]{ri.key, a}; else { return null; @@ -337,10 +335,11 @@ public class ThaumcraftApi //ASPECTS//////////////////////////////////////// - public static ConcurrentHashMap objectTags = new ConcurrentHashMap(); + public static ConcurrentHashMap objectTags = new ConcurrentHashMap(); /** * Checks to see if the passed item/block already has aspects associated with it. + * * @param id * @param meta * @return @@ -377,8 +376,9 @@ public class ThaumcraftApi /** * Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:

* ThaumcraftApi.registerObjectTag(Block.cobblestone.blockID, -1, (new ObjectTags()).add(EnumTag.ROCK, 1).add(EnumTag.DESTRUCTION, 1)); + * * @param id - * @param meta pass -1 if all damage values of this item/block should have the same aspects + * @param meta pass -1 if all damage values of this item/block should have the same aspects * @param aspects A ObjectTags object of the associated aspects */ public static void registerObjectTag(int id, int meta, AspectList aspects) @@ -394,8 +394,9 @@ public class ThaumcraftApi /** * Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:

* ThaumcraftApi.registerObjectTag(Block.cobblestone.blockID, new int[]{0,1}, (new ObjectTags()).add(EnumTag.ROCK, 1).add(EnumTag.DESTRUCTION, 1)); + * * @param id - * @param meta A range of meta values if you wish to lump several item meta's together as being the "same" item (i.e. stair orientations) + * @param meta A range of meta values if you wish to lump several item meta's together as being the "same" item (i.e. stair orientations) * @param aspects A ObjectTags object of the associated aspects */ public static void registerObjectTag(int id, int[] meta, AspectList aspects) @@ -410,6 +411,7 @@ public class ThaumcraftApi /** * Used to assign apsects to the given ore dictionary item. + * * @param oreDict the ore dictionary name * @param aspects A ObjectTags object of the associated aspects */ @@ -424,7 +426,7 @@ public class ThaumcraftApi if (ores != null && ores.size() > 0) { - for (ItemStack ore: ores) + for (ItemStack ore : ores) { int d = ore.getItemDamage(); @@ -443,8 +445,9 @@ public class ThaumcraftApi * Attempts to automatically generate aspect tags by checking registered recipes. * Here is an example of the declaration for pistons:

* ThaumcraftApi.registerComplexObjectTag(Block.pistonBase.blockID, 0, (new ObjectTags()).add(EnumTag.MECHANISM, 2).add(EnumTag.MOTION, 4)); + * * @param id - * @param meta pass -1 if all damage values of this item/block should have the same aspects + * @param meta pass -1 if all damage values of this item/block should have the same aspects * @param aspects A ObjectTags object of the associated aspects */ public static void registerComplexObjectTag(int id, int meta, AspectList aspects) @@ -455,19 +458,18 @@ public class ThaumcraftApi if (tmp != null && tmp.size() > 0) { - for (Aspect tag: tmp.getAspects()) + for (Aspect tag : tmp.getAspects()) { aspects.add(tag, tmp.getAmount(tag)); } } registerObjectTag(id, meta, aspects); - } - else + } else { AspectList tmp = ThaumcraftApiHelper.getObjectAspects(new ItemStack(id, 1, meta)); - for (Aspect tag: aspects.getAspects()) + for (Aspect tag : aspects.getAspects()) { tmp.merge(tag, tmp.getAmount(tag)); } diff --git a/BM_src/thaumcraft/api/ThaumcraftApiHelper.java b/BM_src/thaumcraft/api/ThaumcraftApiHelper.java index b4e21a43..ed1f8e84 100644 --- a/BM_src/thaumcraft/api/ThaumcraftApiHelper.java +++ b/BM_src/thaumcraft/api/ThaumcraftApiHelper.java @@ -1,8 +1,6 @@ package thaumcraft.api; -import java.lang.reflect.Method; -import java.util.HashMap; - +import cpw.mods.fml.common.FMLLog; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; @@ -12,7 +10,9 @@ import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.IEssentiaTransport; -import cpw.mods.fml.common.FMLLog; + +import java.lang.reflect.Method; +import java.util.HashMap; public class ThaumcraftApiHelper { @@ -20,7 +20,7 @@ public class ThaumcraftApiHelper { AspectList temp2 = new AspectList(); - for (Aspect tag: temp.getAspects()) + for (Aspect tag : temp.getAspects()) { if (tag != null) { @@ -33,7 +33,7 @@ public class ThaumcraftApiHelper Aspect lowest = null; int low = Integer.MAX_VALUE; - for (Aspect tag: temp2.getAspects()) + for (Aspect tag : temp2.getAspects()) { if (tag == null) { @@ -58,8 +58,7 @@ public class ThaumcraftApiHelper if (s1.isItemStackDamageable() && s2.isItemStackDamageable()) { return s1.itemID == s2.itemID; - } - else + } else { return s1.itemID == s2.itemID && s1.getItemDamage() == s2.getItemDamage(); } @@ -69,6 +68,7 @@ public class ThaumcraftApiHelper static Method getObjectTags; static Method getBonusTags; static Method generateTags; + public static boolean isResearchComplete(String username, String researchkey) { boolean ot = false; @@ -82,8 +82,7 @@ public class ThaumcraftApiHelper } ot = (Boolean) isResearchComplete.invoke(null, username, researchkey); - } - catch (Exception ex) + } catch (Exception ex) { FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.research.ResearchManager method isResearchComplete"); } @@ -100,8 +99,7 @@ public class ThaumcraftApiHelper Class fake = Class.forName("thaumcraft.common.tiles.TileMagicWorkbench"); Method getStackInRowAndColumn = fake.getMethod("getStackInRowAndColumn", int.class, int.class); ot = (ItemStack) getStackInRowAndColumn.invoke(instance, row, column); - } - catch (Exception ex) + } catch (Exception ex) { FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.tiles.TileMagicWorkbench method getStackInRowAndColumn"); } @@ -122,8 +120,7 @@ public class ThaumcraftApiHelper } ot = (AspectList) getObjectTags.invoke(null, is); - } - catch (Exception ex) + } catch (Exception ex) { FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.ThaumcraftCraftingManager method getObjectTags"); } @@ -142,8 +139,7 @@ public class ThaumcraftApiHelper } ot = (AspectList) getBonusTags.invoke(null, is, ot); - } - catch (Exception ex) + } catch (Exception ex) { FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.ThaumcraftCraftingManager method getBonusTags"); } @@ -162,8 +158,7 @@ public class ThaumcraftApiHelper } return (AspectList) generateTags.invoke(null, id, meta); - } - catch (Exception ex) + } catch (Exception ex) { FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.ThaumcraftCraftingManager method generateTags"); } @@ -201,11 +196,10 @@ public class ThaumcraftApiHelper { TileEntity te = world.getBlockTileEntity(x + face.offsetX, y + face.offsetY, z + face.offsetZ); - if (te instanceof IEssentiaTransport && ((IEssentiaTransport)te).isConnectable(face.getOpposite())) + if (te instanceof IEssentiaTransport && ((IEssentiaTransport) te).isConnectable(face.getOpposite())) { return te; - } - else + } else { return null; } @@ -215,18 +209,17 @@ public class ThaumcraftApiHelper { TileEntity te = world.getBlockTileEntity(x + face.offsetX, y + face.offsetY, z + face.offsetZ); - if (te instanceof IEssentiaTransport && ((IEssentiaTransport)te).isConnectable(face.getOpposite())) + if (te instanceof IEssentiaTransport && ((IEssentiaTransport) te).isConnectable(face.getOpposite())) { return te; - } - else + } else { return null; } } - private static HashMap allAspects = new HashMap(); - private static HashMap allCompoundAspects = new HashMap(); + private static HashMap allAspects = new HashMap(); + private static HashMap allCompoundAspects = new HashMap(); public static AspectList getAllAspects(int amount) { @@ -234,7 +227,7 @@ public class ThaumcraftApiHelper { AspectList al = new AspectList(); - for (Aspect aspect: Aspect.aspects.values()) + for (Aspect aspect : Aspect.aspects.values()) { al.add(aspect, amount); } @@ -251,7 +244,7 @@ public class ThaumcraftApiHelper { AspectList al = new AspectList(); - for (Aspect aspect: Aspect.getCompoundAspects()) + for (Aspect aspect : Aspect.getCompoundAspects()) { al.add(aspect, amount); } diff --git a/BM_src/thaumcraft/api/aspects/Aspect.java b/BM_src/thaumcraft/api/aspects/Aspect.java index 09a0189d..cad05355 100644 --- a/BM_src/thaumcraft/api/aspects/Aspect.java +++ b/BM_src/thaumcraft/api/aspects/Aspect.java @@ -1,14 +1,13 @@ package thaumcraft.api.aspects; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import org.apache.commons.lang3.text.WordUtils; + import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashMap; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import org.apache.commons.lang3.text.WordUtils; - public class Aspect { String tag; @@ -20,11 +19,12 @@ public class Aspect /** * Use this constructor to register your own aspects. - * @param tag the key that will be used to reference this aspect, as well as its latin display name - * @param color color to display the tag in + * + * @param tag the key that will be used to reference this aspect, as well as its latin display name + * @param color color to display the tag in * @param components the aspects this one is formed from - * @param image ResourceLocation pointing to a 32x32 icon of the aspect - * @param blend GL11 blendmode (1 or 771). Used for rendering nodes. Default is 1 + * @param image ResourceLocation pointing to a 32x32 icon of the aspect + * @param blend GL11 blendmode (1 or 771). Used for rendering nodes. Default is 1 */ public Aspect(String tag, int color, Aspect[] components, ResourceLocation image, int blend) { @@ -63,7 +63,7 @@ public class Aspect */ public Aspect(String tag, int color, String chatcolor, int blend) { - this(tag, color, (Aspect[])null, blend); + this(tag, color, (Aspect[]) null, blend); this.setChatcolor(chatcolor); } @@ -133,7 +133,7 @@ public class Aspect ArrayList primals = new ArrayList(); Collection pa = aspects.values(); - for (Aspect aspect: pa) + for (Aspect aspect : pa) { if (aspect.isPrimal()) { @@ -149,7 +149,7 @@ public class Aspect ArrayList compounds = new ArrayList(); Collection pa = aspects.values(); - for (Aspect aspect: pa) + for (Aspect aspect : pa) { if (!aspect.isPrimal()) { @@ -171,7 +171,7 @@ public class Aspect } /////////////////////////////// - public static LinkedHashMap aspects = new LinkedHashMap(); + public static LinkedHashMap aspects = new LinkedHashMap(); //PRIMAL public static final Aspect AIR = new Aspect("aer", 0xffff7e, "e", 1); @@ -182,59 +182,59 @@ public class Aspect public static final Aspect ENTROPY = new Aspect("perditio", 0x404040, "8", 771); //SECONDARY TODO - public static final Aspect VOID = new Aspect("vacuos", 0x888888, new Aspect[] {AIR, ENTROPY}, 771); - public static final Aspect LIGHT = new Aspect("lux", 0xfff663, new Aspect[] {AIR, FIRE}); - public static final Aspect ENERGY = new Aspect("potentia", 0xc0ffff, new Aspect[] {ORDER, FIRE}); - public static final Aspect MOTION = new Aspect("motus", 0xcdccf4, new Aspect[] {AIR, ORDER}); - public static final Aspect STONE = new Aspect("saxum", 0x808080, new Aspect[] {EARTH, EARTH}); - public static final Aspect LIFE = new Aspect("victus", 0xde0005, new Aspect[] {WATER, EARTH}); - public static final Aspect WEATHER = new Aspect("tempestas", 0xFFFFFF, new Aspect[] {AIR, WATER}); - public static final Aspect ICE = new Aspect("gelum", 0xe1ffff, new Aspect[] {WATER, ORDER}); - public static final Aspect CRYSTAL = new Aspect("vitreus", 0x80ffff, new Aspect[] {STONE, WATER}); + public static final Aspect VOID = new Aspect("vacuos", 0x888888, new Aspect[]{AIR, ENTROPY}, 771); + public static final Aspect LIGHT = new Aspect("lux", 0xfff663, new Aspect[]{AIR, FIRE}); + public static final Aspect ENERGY = new Aspect("potentia", 0xc0ffff, new Aspect[]{ORDER, FIRE}); + public static final Aspect MOTION = new Aspect("motus", 0xcdccf4, new Aspect[]{AIR, ORDER}); + public static final Aspect STONE = new Aspect("saxum", 0x808080, new Aspect[]{EARTH, EARTH}); + public static final Aspect LIFE = new Aspect("victus", 0xde0005, new Aspect[]{WATER, EARTH}); + public static final Aspect WEATHER = new Aspect("tempestas", 0xFFFFFF, new Aspect[]{AIR, WATER}); + public static final Aspect ICE = new Aspect("gelum", 0xe1ffff, new Aspect[]{WATER, ORDER}); + public static final Aspect CRYSTAL = new Aspect("vitreus", 0x80ffff, new Aspect[]{STONE, WATER}); //TERTIARY TODO - public static final Aspect DEATH = new Aspect("mortuus", 0x887788, new Aspect[] {LIFE, ENTROPY}); - public static final Aspect FLIGHT = new Aspect("volatus", 0xe7e7d7, new Aspect[] {AIR, MOTION}); - public static final Aspect DARKNESS = new Aspect("tenebrae", 0x222222, new Aspect[] {VOID, LIGHT}); - public static final Aspect SOUL = new Aspect("spiritus", 0xebebfb, new Aspect[] {LIFE, DEATH}); - public static final Aspect HEAL = new Aspect("sano", 0xff2f34, new Aspect[] {LIFE, LIFE}); + public static final Aspect DEATH = new Aspect("mortuus", 0x887788, new Aspect[]{LIFE, ENTROPY}); + public static final Aspect FLIGHT = new Aspect("volatus", 0xe7e7d7, new Aspect[]{AIR, MOTION}); + public static final Aspect DARKNESS = new Aspect("tenebrae", 0x222222, new Aspect[]{VOID, LIGHT}); + public static final Aspect SOUL = new Aspect("spiritus", 0xebebfb, new Aspect[]{LIFE, DEATH}); + public static final Aspect HEAL = new Aspect("sano", 0xff2f34, new Aspect[]{LIFE, LIFE}); - public static final Aspect TRAVEL = new Aspect("iter", 0xe0585b, new Aspect[] {MOTION, EARTH}); - public static final Aspect POISON = new Aspect("venenum", 0x89f000, new Aspect[] {WATER, DEATH}); + public static final Aspect TRAVEL = new Aspect("iter", 0xe0585b, new Aspect[]{MOTION, EARTH}); + public static final Aspect POISON = new Aspect("venenum", 0x89f000, new Aspect[]{WATER, DEATH}); - public static final Aspect ELDRITCH = new Aspect("alienis", 0x805080, new Aspect[] {VOID, DARKNESS}); - public static final Aspect MAGIC = new Aspect("praecantatio", 0x9700c0, new Aspect[] {VOID, ENERGY}); - public static final Aspect AURA = new Aspect("auram", 0xffc0ff, new Aspect[] {MAGIC, AIR}); - public static final Aspect TAINT = new Aspect("vitium", 0x800080, new Aspect[] {MAGIC, ENTROPY}); + public static final Aspect ELDRITCH = new Aspect("alienis", 0x805080, new Aspect[]{VOID, DARKNESS}); + public static final Aspect MAGIC = new Aspect("praecantatio", 0x9700c0, new Aspect[]{VOID, ENERGY}); + public static final Aspect AURA = new Aspect("auram", 0xffc0ff, new Aspect[]{MAGIC, AIR}); + public static final Aspect TAINT = new Aspect("vitium", 0x800080, new Aspect[]{MAGIC, ENTROPY}); - public static final Aspect SEED = new Aspect("granum", 0xeea16e, new Aspect[] {LIFE, EARTH}); - public static final Aspect SLIME = new Aspect("limus", 0x01f800, new Aspect[] {LIFE, WATER}); - public static final Aspect PLANT = new Aspect("herba", 0x01ac00, new Aspect[] {SEED, EARTH}); - public static final Aspect TREE = new Aspect("arbor", 0x876531, new Aspect[] {EARTH, PLANT}); + public static final Aspect SEED = new Aspect("granum", 0xeea16e, new Aspect[]{LIFE, EARTH}); + public static final Aspect SLIME = new Aspect("limus", 0x01f800, new Aspect[]{LIFE, WATER}); + public static final Aspect PLANT = new Aspect("herba", 0x01ac00, new Aspect[]{SEED, EARTH}); + public static final Aspect TREE = new Aspect("arbor", 0x876531, new Aspect[]{EARTH, PLANT}); - public static final Aspect BEAST = new Aspect("bestia", 0x9f6409, new Aspect[] {MOTION, LIFE}); - public static final Aspect FLESH = new Aspect("corpus", 0xee478d, new Aspect[] {DEATH, BEAST}); - public static final Aspect UNDEAD = new Aspect("exanimis", 0x3a4000, new Aspect[] {MOTION, DEATH}); - public static final Aspect MIND = new Aspect("cognitio", 0xffc2b3, new Aspect[] {EARTH, SOUL}); - public static final Aspect SENSES = new Aspect("sensus", 0x0fd9ff, new Aspect[] {AIR, SOUL}); + public static final Aspect BEAST = new Aspect("bestia", 0x9f6409, new Aspect[]{MOTION, LIFE}); + public static final Aspect FLESH = new Aspect("corpus", 0xee478d, new Aspect[]{DEATH, BEAST}); + public static final Aspect UNDEAD = new Aspect("exanimis", 0x3a4000, new Aspect[]{MOTION, DEATH}); + public static final Aspect MIND = new Aspect("cognitio", 0xffc2b3, new Aspect[]{EARTH, SOUL}); + public static final Aspect SENSES = new Aspect("sensus", 0x0fd9ff, new Aspect[]{AIR, SOUL}); - public static final Aspect MAN = new Aspect("humanus", 0xffd7c0, new Aspect[] {BEAST, MIND}); - public static final Aspect CROP = new Aspect("messis", 0xe1b371, new Aspect[] {SEED, MAN}); - public static final Aspect HARVEST = new Aspect("meto", 0xeead82, new Aspect[] {CROP, MAN}); - public static final Aspect METAL = new Aspect("metallum", 0xb5b5cd, new Aspect[] {STONE, ORDER}); - public static final Aspect MINE = new Aspect("perfodio", 0xdcd2d8, new Aspect[] {MAN, STONE}); - public static final Aspect TOOL = new Aspect("instrumentum", 0x4040ee, new Aspect[] {MAN, METAL}); - public static final Aspect WEAPON = new Aspect("telum", 0xc05050, new Aspect[] {TOOL, ENTROPY}); - public static final Aspect ARMOR = new Aspect("tutamen", 0x00c0c0, new Aspect[] {TOOL, EARTH}); - public static final Aspect HUNGER = new Aspect("fames", 0x9a0305, new Aspect[] {LIFE, VOID}); - public static final Aspect GREED = new Aspect("lucrum", 0xe6be44, new Aspect[] {MAN, HUNGER}); - public static final Aspect CRAFT = new Aspect("fabrico", 0x809d80, new Aspect[] {MAN, TOOL}); + public static final Aspect MAN = new Aspect("humanus", 0xffd7c0, new Aspect[]{BEAST, MIND}); + public static final Aspect CROP = new Aspect("messis", 0xe1b371, new Aspect[]{SEED, MAN}); + public static final Aspect HARVEST = new Aspect("meto", 0xeead82, new Aspect[]{CROP, MAN}); + public static final Aspect METAL = new Aspect("metallum", 0xb5b5cd, new Aspect[]{STONE, ORDER}); + public static final Aspect MINE = new Aspect("perfodio", 0xdcd2d8, new Aspect[]{MAN, STONE}); + public static final Aspect TOOL = new Aspect("instrumentum", 0x4040ee, new Aspect[]{MAN, METAL}); + public static final Aspect WEAPON = new Aspect("telum", 0xc05050, new Aspect[]{TOOL, ENTROPY}); + public static final Aspect ARMOR = new Aspect("tutamen", 0x00c0c0, new Aspect[]{TOOL, EARTH}); + public static final Aspect HUNGER = new Aspect("fames", 0x9a0305, new Aspect[]{LIFE, VOID}); + public static final Aspect GREED = new Aspect("lucrum", 0xe6be44, new Aspect[]{MAN, HUNGER}); + public static final Aspect CRAFT = new Aspect("fabrico", 0x809d80, new Aspect[]{MAN, TOOL}); - public static final Aspect CLOTH = new Aspect("pannus", 0xeaeac2, new Aspect[] {TOOL, BEAST}); - public static final Aspect MECHANISM = new Aspect("machina", 0x8080a0, new Aspect[] {MOTION, TOOL}); - public static final Aspect TRAP = new Aspect("vinculum", 0x9a8080, new Aspect[] {MOTION, ENTROPY}); - public static final Aspect EXCHANGE = new Aspect("permutatio", 0x578357, new Aspect[] {MOTION, WATER}); + public static final Aspect CLOTH = new Aspect("pannus", 0xeaeac2, new Aspect[]{TOOL, BEAST}); + public static final Aspect MECHANISM = new Aspect("machina", 0x8080a0, new Aspect[]{MOTION, TOOL}); + public static final Aspect TRAP = new Aspect("vinculum", 0x9a8080, new Aspect[]{MOTION, ENTROPY}); + public static final Aspect EXCHANGE = new Aspect("permutatio", 0x578357, new Aspect[]{MOTION, WATER}); // public static final Aspect LAVA = new Aspect("lava",0xe85729, new Aspect[] {EARTH, FIRE}); // public static final Aspect STEAM = new Aspect("steam",0xFFFFFF, new Aspect[] {WATER, FIRE}); diff --git a/BM_src/thaumcraft/api/aspects/AspectList.java b/BM_src/thaumcraft/api/aspects/AspectList.java index f1ecd3fb..5b662f0e 100644 --- a/BM_src/thaumcraft/api/aspects/AspectList.java +++ b/BM_src/thaumcraft/api/aspects/AspectList.java @@ -1,20 +1,21 @@ package thaumcraft.api.aspects; -import java.io.Serializable; -import java.util.LinkedHashMap; - import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import thaumcraft.api.ThaumcraftApiHelper; +import java.io.Serializable; +import java.util.LinkedHashMap; + public class AspectList implements Serializable { - public LinkedHashMap aspects = new LinkedHashMap(); //aspects associated with this object + public LinkedHashMap aspects = new LinkedHashMap(); //aspects associated with this object /** * this creates a new aspect list with preloaded values based off the aspects of the given item. - * @param id the item/block id of an existing item + * + * @param id the item/block id of an existing item * @param meta the damage value of an existing item */ public AspectList(int id, int meta) @@ -24,12 +25,13 @@ public class AspectList implements Serializable AspectList temp = ThaumcraftApiHelper.getObjectAspects(new ItemStack(id, 1, meta)); if (temp != null) - for (Aspect tag: temp.getAspects()) + for (Aspect tag : temp.getAspects()) { add(tag, temp.getAmount(tag)); } + } catch (Exception e) + { } - catch (Exception e) {} } public AspectList() @@ -40,7 +42,7 @@ public class AspectList implements Serializable { AspectList out = new AspectList(); - for (Aspect a: this.getAspects()) + for (Aspect a : this.getAspects()) { out.add(a, this.getAmount(a)); } @@ -63,7 +65,7 @@ public class AspectList implements Serializable { int q = 0; - for (Aspect as: aspects.keySet()) + for (Aspect as : aspects.keySet()) { q += this.getAmount(as); } @@ -87,7 +89,7 @@ public class AspectList implements Serializable { AspectList t = new AspectList(); - for (Aspect as: aspects.keySet()) + for (Aspect as : aspects.keySet()) { if (as.isPrimal()) { @@ -169,11 +171,12 @@ public class AspectList implements Serializable */ public int getAmount(Aspect key) { - return aspects.get(key) == null ? 0 : aspects.get(key); + return aspects.get(key) == null ? 0 : aspects.get(key); } /** * Reduces the amount of an aspect in this collection by the given amount. + * * @param key * @param amount * @return @@ -193,6 +196,7 @@ public class AspectList implements Serializable /** * Reduces the amount of an aspect in this collection by the given amount. * If reduced to 0 or less the aspect will be removed completely. + * * @param key * @param amount * @return @@ -204,8 +208,7 @@ public class AspectList implements Serializable if (am <= 0) { aspects.remove(key); - } - else + } else { this.aspects.put(key, am); } @@ -215,6 +218,7 @@ public class AspectList implements Serializable /** * Simply removes the aspect from the list + * * @param key * @param amount * @return @@ -228,6 +232,7 @@ public class AspectList implements Serializable /** * Adds this aspect and amount to the collection. * If the aspect exists then its value will be increased by the given amount. + * * @param aspect * @param amount * @return @@ -247,6 +252,7 @@ public class AspectList implements Serializable /** * Adds this aspect and amount to the collection. * If the aspect exists then only the highest of the old or new amount will be used. + * * @param aspect * @param amount * @return @@ -269,6 +275,7 @@ public class AspectList implements Serializable /** * Reads the list of aspects from nbt + * * @param nbttagcompound * @return */ @@ -284,13 +291,14 @@ public class AspectList implements Serializable if (rs.hasKey("key")) { add(Aspect.getAspect(rs.getString("key")), - rs.getInteger("amount")); + rs.getInteger("amount")); } } } /** * Writes the list of aspects to nbt + * * @param nbttagcompound * @return */ diff --git a/BM_src/thaumcraft/api/aspects/IAspectContainer.java b/BM_src/thaumcraft/api/aspects/IAspectContainer.java index dc750663..855e077e 100644 --- a/BM_src/thaumcraft/api/aspects/IAspectContainer.java +++ b/BM_src/thaumcraft/api/aspects/IAspectContainer.java @@ -1,20 +1,20 @@ package thaumcraft.api.aspects; /** - * * @author azanor - * - * Used by blocks like the crucible and alembic to hold their aspects. - * Tiles extending this interface will have their aspects show up when viewed by goggles of revealing - * + *

+ * Used by blocks like the crucible and alembic to hold their aspects. + * Tiles extending this interface will have their aspects show up when viewed by goggles of revealing */ public interface IAspectContainer { public AspectList getAspects(); + public void setAspects(AspectList aspects); /** * This method is used to determine of a specific aspect can be added to this container. + * * @param tag * @return true or false */ @@ -22,6 +22,7 @@ public interface IAspectContainer /** * This method is used to add a certain amount of an aspect to the tile entity. + * * @param tag * @param amount * @return the amount of aspect left over that could not be added. @@ -30,6 +31,7 @@ public interface IAspectContainer /** * Removes a certain amount of a specific aspect from the tile entity + * * @param tag * @param amount * @return true if that amount of aspect was available and was removed @@ -38,6 +40,7 @@ public interface IAspectContainer /** * removes a bunch of different aspects and amounts from the tile entity. + * * @param ot the ObjectTags object that contains the aspects and their amounts. * @return true if all the aspects and their amounts were available and successfully removed */ @@ -45,6 +48,7 @@ public interface IAspectContainer /** * Checks if the tile entity contains the listed amount (or more) of the aspect + * * @param tag * @param amount * @return @@ -53,6 +57,7 @@ public interface IAspectContainer /** * Checks if the tile entity contains all the listed aspects and their amounts + * * @param ot the ObjectTags object that contains the aspects and their amounts. * @return */ @@ -60,6 +65,7 @@ public interface IAspectContainer /** * Returns how much of the aspect this tile entity contains + * * @param tag * @return the amount of that aspect found */ diff --git a/BM_src/thaumcraft/api/aspects/IAspectSource.java b/BM_src/thaumcraft/api/aspects/IAspectSource.java index 20378412..d0ccac33 100644 --- a/BM_src/thaumcraft/api/aspects/IAspectSource.java +++ b/BM_src/thaumcraft/api/aspects/IAspectSource.java @@ -2,10 +2,9 @@ package thaumcraft.api.aspects; /** * @author Azanor - * - * This interface is implemented by tile entites (or possibly anything else) like jars - * so that they can act as an essentia source for blocks like the infusion altar. - * + *

+ * This interface is implemented by tile entites (or possibly anything else) like jars + * so that they can act as an essentia source for blocks like the infusion altar. */ public interface IAspectSource extends IAspectContainer { diff --git a/BM_src/thaumcraft/api/aspects/IEssentiaContainerItem.java b/BM_src/thaumcraft/api/aspects/IEssentiaContainerItem.java index 8a60a12b..9ea36355 100644 --- a/BM_src/thaumcraft/api/aspects/IEssentiaContainerItem.java +++ b/BM_src/thaumcraft/api/aspects/IEssentiaContainerItem.java @@ -1,26 +1,24 @@ package thaumcraft.api.aspects; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; /** - * * @author azanor - * - * Used by wispy essences and essentia phials to hold their aspects. - * Useful for similar item containers that store their aspect information in nbt form so TC - * automatically picks up the aspects they contain - * + *

+ * Used by wispy essences and essentia phials to hold their aspects. + * Useful for similar item containers that store their aspect information in nbt form so TC + * automatically picks up the aspects they contain */ public interface IEssentiaContainerItem { public AspectList getAspects(ItemStack itemstack); + public void setAspects(ItemStack itemstack, AspectList aspects); } //Example implementation /* - @Override + @Override public AspectList getAspects(ItemStack itemstack) { if (itemstack.hasTagCompound()) { AspectList aspects = new AspectList(); diff --git a/BM_src/thaumcraft/api/aspects/IEssentiaTransport.java b/BM_src/thaumcraft/api/aspects/IEssentiaTransport.java index 036e88e7..77eb6590 100644 --- a/BM_src/thaumcraft/api/aspects/IEssentiaTransport.java +++ b/BM_src/thaumcraft/api/aspects/IEssentiaTransport.java @@ -4,13 +4,14 @@ import net.minecraftforge.common.ForgeDirection; /** * @author Azanor - * This interface is used by tiles that use or transport vis. - * Only tiles that implement this interface will be able to connect to vis conduits or other thaumic devices + * This interface is used by tiles that use or transport vis. + * Only tiles that implement this interface will be able to connect to vis conduits or other thaumic devices */ public interface IEssentiaTransport { /** * Is this tile able to connect to other vis users/sources on the specified side? + * * @param face * @return */ @@ -18,6 +19,7 @@ public interface IEssentiaTransport /** * Is this side used to input essentia? + * * @param face * @return */ @@ -25,6 +27,7 @@ public interface IEssentiaTransport /** * Is this side used to output essentia? + * * @param face * @return */ @@ -44,26 +47,29 @@ public interface IEssentiaTransport /** * Sets the amount of suction this block will apply + * * @param suction */ public void setSuction(AspectList suction); /** * Sets the amount of suction this block will apply + * * @param suction */ public void setSuction(Aspect aspect, int amount); /** * Returns the amount of suction this block is applying. - * @param loc - * the location from where the suction is being checked + * + * @param loc the location from where the suction is being checked * @return */ public AspectList getSuction(ForgeDirection face); /** * remove the specified amount of vis from this transport tile + * * @param suction * @return how much was actually taken */ @@ -73,6 +79,7 @@ public interface IEssentiaTransport /** * Essentia will not be drawn from this container unless the suction exceeds this amount. + * * @return the amount */ public int getMinimumSuction(); @@ -80,6 +87,7 @@ public interface IEssentiaTransport /** * Return true if you want the conduit to extend a little further into the block. * Used by jars and alembics that have smaller than normal hitboxes + * * @return */ boolean renderExtendedTube(); diff --git a/BM_src/thaumcraft/api/crafting/CrucibleRecipe.java b/BM_src/thaumcraft/api/crafting/CrucibleRecipe.java index 44fbd8b5..0d8dddbb 100644 --- a/BM_src/thaumcraft/api/crafting/CrucibleRecipe.java +++ b/BM_src/thaumcraft/api/crafting/CrucibleRecipe.java @@ -1,13 +1,13 @@ package thaumcraft.api.crafting; -import java.util.ArrayList; - import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; +import java.util.ArrayList; + public class CrucibleRecipe { public ItemStack recipeOutput; @@ -34,10 +34,10 @@ public class CrucibleRecipe !ThaumcraftApiHelper.itemMatches((ItemStack) catalyst, cat, false)) { return false; - } - else if (catalyst instanceof ArrayList && ((ArrayList)catalyst).size() > 0) + } else if (catalyst instanceof ArrayList && ((ArrayList) catalyst).size() > 0) { - if (!ThaumcraftApiHelper.containsMatch(true, ((ArrayList)catalyst).toArray(new ItemStack[] {}), cat)) return false; + if (!ThaumcraftApiHelper.containsMatch(true, ((ArrayList) catalyst).toArray(new ItemStack[]{}), cat)) + return false; } if (itags == null) @@ -45,7 +45,7 @@ public class CrucibleRecipe return false; } - for (Aspect tag: aspects.getAspects()) + for (Aspect tag : aspects.getAspects()) { if (itags.getAmount(tag) < aspects.getAmount(tag)) { @@ -61,7 +61,7 @@ public class CrucibleRecipe AspectList temptags = new AspectList(); temptags.aspects.putAll(itags.aspects); - for (Aspect tag: aspects.getAspects()) + for (Aspect tag : aspects.getAspects()) { temptags.remove(tag, aspects.getAmount(tag)); // if (!temptags.remove(tag, aspects.getAmount(tag))) return null; diff --git a/BM_src/thaumcraft/api/crafting/IArcaneRecipe.java b/BM_src/thaumcraft/api/crafting/IArcaneRecipe.java index be3708af..37690ebd 100644 --- a/BM_src/thaumcraft/api/crafting/IArcaneRecipe.java +++ b/BM_src/thaumcraft/api/crafting/IArcaneRecipe.java @@ -10,6 +10,7 @@ public interface IArcaneRecipe { /** * Used to check if a recipe matches current crafting inventory + * * @param player */ boolean matches(IInventory var1, World world, EntityPlayer player); @@ -25,6 +26,8 @@ public interface IArcaneRecipe int getRecipeSize(); ItemStack getRecipeOutput(); + AspectList getAspects(); + String getResearch(); } diff --git a/BM_src/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java b/BM_src/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java index cf8ff3ba..d43110e6 100644 --- a/BM_src/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java +++ b/BM_src/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java @@ -1,9 +1,5 @@ package thaumcraft.api.crafting; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Map; - import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.player.EntityPlayer; @@ -13,6 +9,10 @@ import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.AspectList; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Map; + public class InfusionEnchantmentRecipe { public AspectList aspects; @@ -35,6 +35,7 @@ public class InfusionEnchantmentRecipe /** * Used to check if a recipe matches current crafting inventory + * * @param player */ public boolean matches(ArrayList input, ItemStack central, World world, EntityPlayer player) @@ -54,7 +55,7 @@ public class InfusionEnchantmentRecipe while (iterator.hasNext()) { - int j1 = ((Integer)iterator.next()).intValue(); + int j1 = ((Integer) iterator.next()).intValue(); Enchantment ench = Enchantment.enchantmentsList[j1]; if (j1 == enchantment.effectId && @@ -65,7 +66,7 @@ public class InfusionEnchantmentRecipe if (enchantment.effectId != ench.effectId && (!enchantment.canApplyTogether(ench) || - !ench.canApplyTogether(enchantment))) + !ench.canApplyTogether(enchantment))) { return false; } @@ -74,12 +75,12 @@ public class InfusionEnchantmentRecipe ItemStack i2 = null; ArrayList ii = new ArrayList(); - for (ItemStack is: input) + for (ItemStack is : input) { ii.add(is.copy()); } - for (ItemStack comp: components) + for (ItemStack comp : components) { boolean b = false; @@ -136,13 +137,12 @@ public class InfusionEnchantmentRecipe if (od != -1) { - ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[] {}); + ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); - if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[] {stack1}, ores)) + if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } - } - else + } else { t1 = ItemStack.areItemStackTagsEqual(stack0, stack1); } @@ -173,7 +173,7 @@ public class InfusionEnchantmentRecipe while (iterator.hasNext()) { - int j1 = ((Integer)iterator.next()).intValue(); + int j1 = ((Integer) iterator.next()).intValue(); i += EnchantmentHelper.getEnchantmentLevel(j1, recipeInput); } @@ -193,7 +193,7 @@ public class InfusionEnchantmentRecipe while (iterator.hasNext()) { - int j1 = ((Integer)iterator.next()).intValue(); + int j1 = ((Integer) iterator.next()).intValue(); if (j1 != enchantment.effectId) { diff --git a/BM_src/thaumcraft/api/crafting/InfusionRecipe.java b/BM_src/thaumcraft/api/crafting/InfusionRecipe.java index 30c81937..4fa3ac00 100644 --- a/BM_src/thaumcraft/api/crafting/InfusionRecipe.java +++ b/BM_src/thaumcraft/api/crafting/InfusionRecipe.java @@ -1,7 +1,5 @@ package thaumcraft.api.crafting; -import java.util.ArrayList; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -9,6 +7,8 @@ import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.AspectList; +import java.util.ArrayList; + public class InfusionRecipe { public AspectList aspects; @@ -31,6 +31,7 @@ public class InfusionRecipe /** * Used to check if a recipe matches current crafting inventory + * * @param player */ public boolean matches(ArrayList input, ItemStack central, World world, EntityPlayer player) @@ -54,12 +55,12 @@ public class InfusionRecipe ArrayList ii = new ArrayList(); - for (ItemStack is: input) + for (ItemStack is : input) { ii.add(is.copy()); } - for (ItemStack comp: components) + for (ItemStack comp : components) { boolean b = false; @@ -116,13 +117,12 @@ public class InfusionRecipe if (od != -1) { - ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[] {}); + ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); - if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[] {stack1}, ores)) + if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) return true; } - } - else + } else { t1 = ItemStack.areItemStackTagsEqual(stack0, stack1); } diff --git a/BM_src/thaumcraft/api/crafting/ShapedArcaneRecipe.java b/BM_src/thaumcraft/api/crafting/ShapedArcaneRecipe.java index 7cf9557b..5d372527 100644 --- a/BM_src/thaumcraft/api/crafting/ShapedArcaneRecipe.java +++ b/BM_src/thaumcraft/api/crafting/ShapedArcaneRecipe.java @@ -1,12 +1,8 @@ package thaumcraft.api.crafting; -import java.util.ArrayList; -import java.util.HashMap; - import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -14,6 +10,9 @@ import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.AspectList; +import java.util.ArrayList; +import java.util.HashMap; + public class ShapedArcaneRecipe implements IArcaneRecipe { //Added in for future ease of change, but hard coded for now. @@ -21,21 +20,23 @@ public class ShapedArcaneRecipe implements IArcaneRecipe private static final int MAX_CRAFT_GRID_HEIGHT = 3; public ItemStack output = null; - public Object[] input = null; + public Object[] input = null; public AspectList aspects = null; public String research; public int width = 0; public int height = 0; private boolean mirrored = true; - public ShapedArcaneRecipe(String research, Block result, AspectList aspects, Object... recipe) + public ShapedArcaneRecipe(String research, Block result, AspectList aspects, Object... recipe) { this(research, new ItemStack(result), aspects, recipe); } - public ShapedArcaneRecipe(String research, Item result, AspectList aspects, Object... recipe) + + public ShapedArcaneRecipe(String research, Item result, AspectList aspects, Object... recipe) { this(research, new ItemStack(result), aspects, recipe); } + public ShapedArcaneRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) { output = result.copy(); @@ -46,13 +47,12 @@ public class ShapedArcaneRecipe implements IArcaneRecipe if (recipe[idx] instanceof Boolean) { - mirrored = (Boolean)recipe[idx]; + mirrored = (Boolean) recipe[idx]; if (recipe[idx + 1] instanceof Object[]) { - recipe = (Object[])recipe[idx + 1]; - } - else + recipe = (Object[]) recipe[idx + 1]; + } else { idx = 1; } @@ -60,7 +60,7 @@ public class ShapedArcaneRecipe implements IArcaneRecipe if (recipe[idx] instanceof String[]) { - String[] parts = ((String[])recipe[idx++]); + String[] parts = ((String[]) recipe[idx++]); for (String s : parts) { @@ -69,12 +69,11 @@ public class ShapedArcaneRecipe implements IArcaneRecipe } height = parts.length; - } - else + } else { while (recipe[idx] instanceof String) { - String s = (String)recipe[idx++]; + String s = (String) recipe[idx++]; shape += s; width = s.length(); height++; @@ -85,7 +84,7 @@ public class ShapedArcaneRecipe implements IArcaneRecipe { String ret = "Invalid shaped ore recipe: "; - for (Object tmp : recipe) + for (Object tmp : recipe) { ret += tmp + ", "; } @@ -94,34 +93,30 @@ public class ShapedArcaneRecipe implements IArcaneRecipe throw new RuntimeException(ret); } - HashMap itemMap = new HashMap(); + HashMap itemMap = new HashMap(); for (; idx < recipe.length; idx += 2) { - Character chr = (Character)recipe[idx]; + Character chr = (Character) recipe[idx]; Object in = recipe[idx + 1]; if (in instanceof ItemStack) { - itemMap.put(chr, ((ItemStack)in).copy()); - } - else if (in instanceof Item) + itemMap.put(chr, ((ItemStack) in).copy()); + } else if (in instanceof Item) { - itemMap.put(chr, new ItemStack((Item)in)); - } - else if (in instanceof Block) + itemMap.put(chr, new ItemStack((Item) in)); + } else if (in instanceof Block) { - itemMap.put(chr, new ItemStack((Block)in, 1, OreDictionary.WILDCARD_VALUE)); - } - else if (in instanceof String) + itemMap.put(chr, new ItemStack((Block) in, 1, OreDictionary.WILDCARD_VALUE)); + } else if (in instanceof String) { - itemMap.put(chr, OreDictionary.getOres((String)in)); - } - else + itemMap.put(chr, OreDictionary.getOres((String) in)); + } else { String ret = "Invalid shaped ore recipe: "; - for (Object tmp : recipe) + for (Object tmp : recipe) { ret += tmp + ", "; } @@ -200,8 +195,7 @@ public class ShapedArcaneRecipe implements IArcaneRecipe if (mirror) { target = input[width - subX - 1 + subY * width]; - } - else + } else { target = input[subX + subY * width]; } @@ -211,16 +205,15 @@ public class ShapedArcaneRecipe implements IArcaneRecipe if (target instanceof ItemStack) { - if (!checkItemEquals((ItemStack)target, slot)) + if (!checkItemEquals((ItemStack) target, slot)) { return false; } - } - else if (target instanceof ArrayList) + } else if (target instanceof ArrayList) { boolean matched = false; - for (ItemStack item : (ArrayList)target) + for (ItemStack item : (ArrayList) target) { matched = matched || checkItemEquals(item, slot); } @@ -229,8 +222,7 @@ public class ShapedArcaneRecipe implements IArcaneRecipe { return false; } - } - else if (target == null && slot != null) + } else if (target == null && slot != null) { return false; } @@ -261,6 +253,7 @@ public class ShapedArcaneRecipe implements IArcaneRecipe /** * Returns the input for this recipe, any mod accessing this value should never * manipulate the values in this array as it will effect the recipe itself. + * * @return The recipes input vales. */ public Object[] getInput() diff --git a/BM_src/thaumcraft/api/crafting/ShapelessArcaneRecipe.java b/BM_src/thaumcraft/api/crafting/ShapelessArcaneRecipe.java index 8dd5c252..9687803b 100644 --- a/BM_src/thaumcraft/api/crafting/ShapelessArcaneRecipe.java +++ b/BM_src/thaumcraft/api/crafting/ShapelessArcaneRecipe.java @@ -1,8 +1,5 @@ package thaumcraft.api.crafting; -import java.util.ArrayList; -import java.util.Iterator; - import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -13,6 +10,9 @@ import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.AspectList; +import java.util.ArrayList; +import java.util.Iterator; + public class ShapelessArcaneRecipe implements IArcaneRecipe { private ItemStack output = null; @@ -25,7 +25,8 @@ public class ShapelessArcaneRecipe implements IArcaneRecipe { this(research, new ItemStack(result), aspects, recipe); } - public ShapelessArcaneRecipe(String research, Item result, AspectList aspects, Object... recipe) + + public ShapelessArcaneRecipe(String research, Item result, AspectList aspects, Object... recipe) { this(research, new ItemStack(result), aspects, recipe); } @@ -40,25 +41,21 @@ public class ShapelessArcaneRecipe implements IArcaneRecipe { if (in instanceof ItemStack) { - input.add(((ItemStack)in).copy()); - } - else if (in instanceof Item) + input.add(((ItemStack) in).copy()); + } else if (in instanceof Item) { - input.add(new ItemStack((Item)in)); - } - else if (in instanceof Block) + input.add(new ItemStack((Item) in)); + } else if (in instanceof Block) { - input.add(new ItemStack((Block)in)); - } - else if (in instanceof String) + input.add(new ItemStack((Block) in)); + } else if (in instanceof String) { - input.add(OreDictionary.getOres((String)in)); - } - else + input.add(OreDictionary.getOres((String) in)); + } else { String ret = "Invalid shapeless ore recipe: "; - for (Object tmp : recipe) + for (Object tmp : recipe) { ret += tmp + ", "; } @@ -113,11 +110,10 @@ public class ShapelessArcaneRecipe implements IArcaneRecipe if (next instanceof ItemStack) { - match = checkItemEquals((ItemStack)next, slot); - } - else if (next instanceof ArrayList) + match = checkItemEquals((ItemStack) next, slot); + } else if (next instanceof ArrayList) { - for (ItemStack item : (ArrayList)next) + for (ItemStack item : (ArrayList) next) { match = match || checkItemEquals(item, slot); } @@ -151,6 +147,7 @@ public class ShapelessArcaneRecipe implements IArcaneRecipe /** * Returns the input for this recipe, any mod accessing this value should never * manipulate the values in this array as it will effect the recipe itself. + * * @return The recipes input vales. */ public ArrayList getInput() diff --git a/BM_src/thaumcraft/api/nodes/INode.java b/BM_src/thaumcraft/api/nodes/INode.java index 8d8107e3..f7f755c0 100644 --- a/BM_src/thaumcraft/api/nodes/INode.java +++ b/BM_src/thaumcraft/api/nodes/INode.java @@ -6,42 +6,49 @@ public interface INode extends IAspectContainer { /** * Unique identifier to distinguish nodes. Normal node id's are based on world id and coordinates + * * @return */ public String getId(); /** * Return the type of node + * * @return */ public NodeType getNodeType(); /** * Set the type of node + * * @return */ public void setNodeType(NodeType nodeType); /** * Return the node modifier + * * @return */ public void setNodeModifier(NodeModifier nodeModifier); /** * Set the node modifier + * * @return */ public NodeModifier getNodeModifier(); /** * Return the maximum capacity of each aspect the node can hold + * * @return */ public int getNodeVisBase(); /** * Set the maximum capacity of each aspect the node can hold + * * @return */ public void setNodeVisBase(short nodeVisBase); diff --git a/BM_src/thaumcraft/api/nodes/IRevealer.java b/BM_src/thaumcraft/api/nodes/IRevealer.java index 69beb8d5..8f7bc2e7 100644 --- a/BM_src/thaumcraft/api/nodes/IRevealer.java +++ b/BM_src/thaumcraft/api/nodes/IRevealer.java @@ -4,11 +4,9 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; /** - * * @author Azanor - * - * Equipped head slot items that extend this class will make nodes visible in world. - * + *

+ * Equipped head slot items that extend this class will make nodes visible in world. */ public interface IRevealer diff --git a/BM_src/thaumcraft/api/research/ResearchCategories.java b/BM_src/thaumcraft/api/research/ResearchCategories.java index 0962f9c0..8ba14edb 100644 --- a/BM_src/thaumcraft/api/research/ResearchCategories.java +++ b/BM_src/thaumcraft/api/research/ResearchCategories.java @@ -1,15 +1,15 @@ package thaumcraft.api.research; -import java.util.Collection; -import java.util.LinkedHashMap; - import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; +import java.util.Collection; +import java.util.LinkedHashMap; + public class ResearchCategories { //Research - public static LinkedHashMap researchCategories = new LinkedHashMap (); + public static LinkedHashMap researchCategories = new LinkedHashMap(); /** * @param key @@ -38,15 +38,15 @@ public class ResearchCategories { Collection rc = researchCategories.values(); - for (Object cat: rc) + for (Object cat : rc) { - Collection rl = ((ResearchCategoryList)cat).research.values(); + Collection rl = ((ResearchCategoryList) cat).research.values(); - for (Object ri: rl) + for (Object ri : rl) { - if ((((ResearchItem)ri).key).equals(key)) + if ((((ResearchItem) ri).key).equals(key)) { - return (ResearchItem)ri; + return (ResearchItem) ri; } } } @@ -55,8 +55,8 @@ public class ResearchCategories } /** - * @param key the key used for this category - * @param icon the icon to be used for the research category tab + * @param key the key used for this category + * @param icon the icon to be used for the research category tab * @param background the resource location of the background image to use for this category * @return the name of the research linked to this key */ diff --git a/BM_src/thaumcraft/api/research/ResearchCategoryList.java b/BM_src/thaumcraft/api/research/ResearchCategoryList.java index 5718b86e..e1e85c86 100644 --- a/BM_src/thaumcraft/api/research/ResearchCategoryList.java +++ b/BM_src/thaumcraft/api/research/ResearchCategoryList.java @@ -1,25 +1,35 @@ package thaumcraft.api.research; +import net.minecraft.util.ResourceLocation; + import java.util.HashMap; import java.util.Map; -import net.minecraft.util.ResourceLocation; - public class ResearchCategoryList { - /** Is the smallest column used on the GUI. */ + /** + * Is the smallest column used on the GUI. + */ public int minDisplayColumn; - /** Is the smallest row used on the GUI. */ + /** + * Is the smallest row used on the GUI. + */ public int minDisplayRow; - /** Is the biggest column used on the GUI. */ + /** + * Is the biggest column used on the GUI. + */ public int maxDisplayColumn; - /** Is the biggest row used on the GUI. */ + /** + * Is the biggest row used on the GUI. + */ public int maxDisplayRow; - /** display variables **/ + /** + * display variables * + */ public ResourceLocation icon; public ResourceLocation background; @@ -30,5 +40,5 @@ public class ResearchCategoryList } //Research - public Map research = new HashMap(); + public Map research = new HashMap(); } diff --git a/BM_src/thaumcraft/api/research/ResearchItem.java b/BM_src/thaumcraft/api/research/ResearchItem.java index a4484a6d..5b2cf909 100644 --- a/BM_src/thaumcraft/api/research/ResearchItem.java +++ b/BM_src/thaumcraft/api/research/ResearchItem.java @@ -1,12 +1,12 @@ package thaumcraft.api.research; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ResearchItem { @@ -322,13 +322,13 @@ public class ResearchItem int highest = 0; if (tags != null) - for (Aspect tag: tags.getAspects()) + for (Aspect tag : tags.getAspects()) { if (tags.getAmount(tag) > highest) { aspect = tag; highest = tags.getAmount(tag); - }; + } ; } return aspect; diff --git a/BM_src/thaumcraft/api/research/ResearchPage.java b/BM_src/thaumcraft/api/research/ResearchPage.java index 9794c31b..57ae8290 100644 --- a/BM_src/thaumcraft/api/research/ResearchPage.java +++ b/BM_src/thaumcraft/api/research/ResearchPage.java @@ -1,7 +1,5 @@ package thaumcraft.api.research; -import java.util.List; - import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.ResourceLocation; @@ -12,6 +10,8 @@ import thaumcraft.api.crafting.IArcaneRecipe; import thaumcraft.api.crafting.InfusionEnchantmentRecipe; import thaumcraft.api.crafting.InfusionRecipe; +import java.util.List; + public class ResearchPage { public static enum PageType @@ -48,7 +48,7 @@ public class ResearchPage /** * @param research this page will only be displayed if the player has discovered this research - * @param text this can (but does not have to) be a reference to a localization variable, not the actual text. + * @param text this can (but does not have to) be a reference to a localization variable, not the actual text. */ public ResearchPage(String research, String text) { @@ -134,8 +134,7 @@ public class ResearchPage if (recipe.recipeOutput instanceof ItemStack) { this.recipeOutput = (ItemStack) recipe.recipeOutput; - } - else + } else { this.recipeOutput = recipe.recipeInput; } @@ -177,6 +176,7 @@ public class ResearchPage /** * returns a localized text of the text field (if one exists). Returns the text field itself otherwise. + * * @return */ public String getTranslatedText() diff --git a/BM_src/thaumcraft/api/wands/IWandFocus.java b/BM_src/thaumcraft/api/wands/IWandFocus.java index 4dfccd20..c0922ed5 100644 --- a/BM_src/thaumcraft/api/wands/IWandFocus.java +++ b/BM_src/thaumcraft/api/wands/IWandFocus.java @@ -46,6 +46,7 @@ public interface IWandFocus /** * Helper method to determine in what order foci should be iterated through when * the user presses the 'change focus' keybinding. + * * @return a string of characters that foci will be sorted against. * For example AA00 will be placed before FG12 *
As a guide build the sort string from two alphanumeric characters followed by diff --git a/BM_src/thaumcraft/api/wands/IWandRodOnUpdate.java b/BM_src/thaumcraft/api/wands/IWandRodOnUpdate.java index 204f3c20..5f9053f8 100644 --- a/BM_src/thaumcraft/api/wands/IWandRodOnUpdate.java +++ b/BM_src/thaumcraft/api/wands/IWandRodOnUpdate.java @@ -4,12 +4,10 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; /** - * * @author azanor - * - * Implemented by a class that you wish to be called whenever a wand with this rod performs its - * update tick. - * + *

+ * Implemented by a class that you wish to be called whenever a wand with this rod performs its + * update tick. */ public interface IWandRodOnUpdate { diff --git a/BM_src/thaumcraft/api/wands/IWandable.java b/BM_src/thaumcraft/api/wands/IWandable.java index d5de755f..0e14241e 100644 --- a/BM_src/thaumcraft/api/wands/IWandable.java +++ b/BM_src/thaumcraft/api/wands/IWandable.java @@ -5,11 +5,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; /** - * * @author azanor - * - * Add this to a tile entity that you wish wands to interact with in some way. - * + *

+ * Add this to a tile entity that you wish wands to interact with in some way. */ public interface IWandable diff --git a/BM_src/thaumcraft/api/wands/ItemFocusBasic.java b/BM_src/thaumcraft/api/wands/ItemFocusBasic.java index aee17db2..deb02d96 100644 --- a/BM_src/thaumcraft/api/wands/ItemFocusBasic.java +++ b/BM_src/thaumcraft/api/wands/ItemFocusBasic.java @@ -1,9 +1,7 @@ package thaumcraft.api.wands; -import java.text.DecimalFormat; -import java.util.List; -import java.util.Map; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -16,10 +14,12 @@ import net.minecraft.world.World; import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class ItemFocusBasic extends Item implements IWandFocus +import java.text.DecimalFormat; +import java.util.List; +import java.util.Map; + +public class ItemFocusBasic extends Item implements IWandFocus { public ItemFocusBasic(int i) { @@ -59,7 +59,7 @@ public class ItemFocusBasic extends Item implements IWandFocus { list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1")); - for (Aspect aspect: al.getAspectsSorted()) + for (Aspect aspect : al.getAspectsSorted()) { DecimalFormat myFormatter = new DecimalFormat("#####.##"); String amount = myFormatter.format(al.getAmount(aspect) / 100f); @@ -122,10 +122,10 @@ public class ItemFocusBasic extends Item implements IWandFocus @Override public String getSortingHelper(ItemStack itemstack) { - Map ench = EnchantmentHelper.getEnchantments(itemstack); + Map ench = EnchantmentHelper.getEnchantments(itemstack); String out = ""; - for (Integer lvl: ench.values()) + for (Integer lvl : ench.values()) { out = out + lvl + ""; } diff --git a/BM_src/thaumcraft/api/wands/WandCap.java b/BM_src/thaumcraft/api/wands/WandCap.java index 1aac395f..2d658039 100644 --- a/BM_src/thaumcraft/api/wands/WandCap.java +++ b/BM_src/thaumcraft/api/wands/WandCap.java @@ -1,17 +1,17 @@ package thaumcraft.api.wands; -import java.util.LinkedHashMap; -import java.util.List; - import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import thaumcraft.api.aspects.Aspect; +import java.util.LinkedHashMap; +import java.util.List; + /** * This class is used to keep the material information for the various caps. * It is also used to generate the wand recipes ingame. - * @author Azanor * + * @author Azanor */ public class WandCap { @@ -47,7 +47,7 @@ public class WandCap */ ItemStack item; - public static LinkedHashMap caps = new LinkedHashMap(); + public static LinkedHashMap caps = new LinkedHashMap(); public WandCap(String tag, float discount, ItemStack item, int craftCost) { diff --git a/BM_src/thaumcraft/api/wands/WandRod.java b/BM_src/thaumcraft/api/wands/WandRod.java index 3b5fa57a..4659f4ac 100644 --- a/BM_src/thaumcraft/api/wands/WandRod.java +++ b/BM_src/thaumcraft/api/wands/WandRod.java @@ -1,17 +1,15 @@ package thaumcraft.api.wands; -import java.util.LinkedHashMap; - import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; +import java.util.LinkedHashMap; + /** - * * @author Azanor - * - * This class is used to keep the material information for the various rods. - * It is also used to generate the wand recipes ingame. - * + *

+ * This class is used to keep the material information for the various rods. + * It is also used to generate the wand recipes ingame. */ public class WandRod { @@ -48,7 +46,7 @@ public class WandRod */ boolean glow; - public static LinkedHashMap rods = new LinkedHashMap(); + public static LinkedHashMap rods = new LinkedHashMap(); public WandRod(String tag, int capacity, ItemStack item, int craftCost, ResourceLocation texture) { diff --git a/BM_src/thaumcraft/api/wands/WandTriggerRegistry.java b/BM_src/thaumcraft/api/wands/WandTriggerRegistry.java index f6fbd44c..ac2d337b 100644 --- a/BM_src/thaumcraft/api/wands/WandTriggerRegistry.java +++ b/BM_src/thaumcraft/api/wands/WandTriggerRegistry.java @@ -1,13 +1,13 @@ package thaumcraft.api.wands; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; + /** * This class serves a similar function to IWandable in that it allows wands to interact * with object in the world. In this case it is most useful for adding interaction with non-mod @@ -16,25 +16,25 @@ import net.minecraft.world.World; * crucible from a cauldron * * @author azanor - * */ public class WandTriggerRegistry { /** * Registers an action to perform when a casting wand right clicks on a specific block. * A manager class needs to be created that implements IWandTriggerManager. + * * @param manager - * @param event a logical number that you can use to differentiate different events or actions + * @param event a logical number that you can use to differentiate different events or actions * @param blockid - * @param meta send -1 as a wildcard value for all possible meta values + * @param meta send -1 as a wildcard value for all possible meta values */ public static void registerWandBlockTrigger(IWandTriggerManager manager, int event, int blockid, int meta) { triggers.put(Arrays.asList(blockid, meta), - Arrays.asList(manager, event)); + Arrays.asList(manager, event)); } - private static HashMap, List> triggers = new HashMap, List>(); + private static HashMap,List> triggers = new HashMap,List>(); public static boolean hasTrigger(int blockid, int meta) { @@ -50,6 +50,7 @@ public class WandTriggerRegistry /** * This is called by the onItemUseFirst function in wands. * Parameters and return value functions like you would expect for that function. + * * @param world * @param wand * @param player