diff --git a/build.properties b/build.properties index 972dcbd..b08cab3 100644 --- a/build.properties +++ b/build.properties @@ -3,5 +3,5 @@ package_group=com.tombenpotter.emt mc_version=1.7.10 forge_version=10.13.4.1481 -mod_version=1.2.2 +mod_version=1.2.3 mod_name=ElectroMagicTools diff --git a/src/main/java/tombenpotter/emt/ElectroMagicTools.java b/src/main/java/tombenpotter/emt/ElectroMagicTools.java index ac124ce..55b471a 100644 --- a/src/main/java/tombenpotter/emt/ElectroMagicTools.java +++ b/src/main/java/tombenpotter/emt/ElectroMagicTools.java @@ -1,5 +1,6 @@ package tombenpotter.emt; +import ic2.core.Ic2Items; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; @@ -14,6 +15,7 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.relauncher.Side; import net.minecraft.creativetab.CreativeTabs; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.oredict.OreDictionary; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockBase.java b/src/main/java/tombenpotter/emt/common/blocks/BlockBase.java index b34670c..0ed801b 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockBase.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockBase.java @@ -9,7 +9,6 @@ public abstract class BlockBase extends Block { public BlockBase(String unlocName, Material material, String textureName, SoundType soundType, float hardness) { super(material); - setBlockName(ModInformation.modid + ".block." + unlocName); setBlockTextureName(ModInformation.texturePath + ":" + textureName); setCreativeTab(ElectroMagicTools.tabEMT); @@ -19,7 +18,6 @@ public abstract class BlockBase extends Block { public BlockBase(String unlocName, Material material, SoundType soundType, float hardness) { super(material); - setBlockName(ModInformation.modid + ".block." + unlocName); setCreativeTab(ElectroMagicTools.tabEMT); setStepSound(soundType); diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerator.java b/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerator.java deleted file mode 100644 index 87f4ab5..0000000 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerator.java +++ /dev/null @@ -1,65 +0,0 @@ -package tombenpotter.emt.common.blocks; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.IEssentiaContainerItem; -import tombenpotter.emt.ModInformation; -import tombenpotter.emt.common.tile.generators.TileEntityEssentiaGenerator; - -public class BlockEssentiaGenerator extends BlockBaseContainer { - - public BlockEssentiaGenerator() { - super("generator.essentia", Material.iron, soundTypeMetal, 4.0F); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ri) { - this.blockIcon = ri.registerIcon(ModInformation.texturePath + ":machines/top"); - this.top[0] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top"); - this.bottom[0] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top"); - this.side[0] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/side"); - } - - @Override - public TileEntity createNewTileEntity(World var1, int var2) { - return new TileEntityEssentiaGenerator(); - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { - TileEntityEssentiaGenerator tile = (TileEntityEssentiaGenerator) world.getTileEntity(x, y, z); - if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IEssentiaContainerItem) { - IEssentiaContainerItem item = (IEssentiaContainerItem) player.getHeldItem().getItem(); - Aspect aspect = item.getAspects(player.getHeldItem()).getAspects()[0]; - if (tile.isFree[0]) { - tile.aspects[0] = aspect.getTag(); - tile.isFree[0] = false; - } else if (tile.isFree[1]) { - tile.aspects[1] = aspect.getTag(); - tile.isFree[1] = false; - } else if (tile.isFree[2]) { - tile.aspects[2] = aspect.getTag(); - tile.isFree[2] = false; - } else if (tile.isFree[3]) { - tile.aspects[3] = aspect.getTag(); - tile.isFree[3] = false; - } - return true; - } else if (player.getHeldItem() == null && player.isSneaking()) { - for (int i = 0; i < tile.aspects.length; i++) { - if (!tile.isFree[i]) { - tile.isFree[i] = true; - } - } - return true; - } - return false; - } -} diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerators.java b/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerators.java index f4a3673..55ee565 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerators.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerators.java @@ -57,29 +57,18 @@ public class BlockEssentiaGenerators extends BlockBaseContainer { @Override public TileEntity createTileEntity(World world, int meta) { - if (meta == 0) { - return new TileEntityPotentiaGenerator(); - } - if (meta == 1) { - return new TileEntityIgnisGenerator(); - } - if (meta == 2) { - return new TileEntityAuramGenerator(); - } - if (meta == 3) { - return new TileEntityArborGenerator(); - } - if (meta == 4) { - return new TileEntityAerGenerator(); - } + switch(meta){ + case 0 : return new TileEntityPotentiaGenerator(); + case 1 : return new TileEntityIgnisGenerator(); + case 2 : return new TileEntityAuramGenerator(); + case 3 : return new TileEntityArborGenerator(); + case 4 : return new TileEntityAerGenerator(); + } return super.createTileEntity(world, meta); } @SideOnly(Side.CLIENT) - public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { - float f = (float) par2 + 0.5F; - float f1 = (float) par3 + 1.0F; - float f2 = (float) par4 + 0.5F; - par1World.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + public void randomDisplayTick(World world, int x, int y, int z, Random random) { + world.spawnParticle("largesmoke", x + 0.5f, y + 1.0f, z + 0.5f, 0.0D, 0.0D, 0.0D); } } diff --git a/src/main/java/tombenpotter/emt/common/init/BlockRegistry.java b/src/main/java/tombenpotter/emt/common/init/BlockRegistry.java index 74691fa..931127d 100644 --- a/src/main/java/tombenpotter/emt/common/init/BlockRegistry.java +++ b/src/main/java/tombenpotter/emt/common/init/BlockRegistry.java @@ -11,7 +11,6 @@ import tombenpotter.emt.ModInformation; import tombenpotter.emt.common.blocks.BlockEMTMachines; import tombenpotter.emt.common.blocks.BlockEMTSolars; import tombenpotter.emt.common.blocks.BlockEMTSolars2; -import tombenpotter.emt.common.blocks.BlockEssentiaGenerator; import tombenpotter.emt.common.blocks.BlockEssentiaGenerators; import tombenpotter.emt.common.blocks.BlockPortableNode; import tombenpotter.emt.common.blocks.BlockShield; diff --git a/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java b/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java index 763ba3e..4b917ac 100644 --- a/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java +++ b/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java @@ -7,18 +7,27 @@ import ic2.api.item.IC2Items; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.Recipes; +import ic2.core.Ic2Items; +import ic2.core.item.ItemFluidCell; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; import thaumcraft.api.crafting.CrucibleRecipe; import thaumcraft.api.crafting.InfusionRecipe; import thaumcraft.api.crafting.ShapedArcaneRecipe; import thaumcraft.api.crafting.ShapelessArcaneRecipe; +import thaumcraft.common.blocks.ItemJarFilled; +import thaumcraft.common.blocks.ItemJarNode; import thaumcraft.common.config.ConfigBlocks; import thaumcraft.common.config.ConfigItems; import tombenpotter.emt.ElectroMagicTools; @@ -207,7 +216,7 @@ public class RecipeRegistry { quantumWings = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Wings", RandomHelper.getChargedItem(ItemRegistry.quantumWing, 10), 6, CraftingAspects.quantumWing, new ItemStack(ItemRegistry.nanoWing, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1)}); - infusedQuantumArmor = ThaumcraftApi.addInfusionCraftingRecipe("InfusedQuantumArmor", RandomHelper.getChargedItem(ItemRegistry.quantumArmor, 10), 5, CraftingAspects.quantumWing, new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(BlockRegistry.shield), new ItemStack(BlockRegistry.shield)}); + infusedQuantumArmor = ThaumcraftApi.addInfusionCraftingRecipe("Infused Quantum Armor", RandomHelper.getChargedItem(ItemRegistry.quantumArmor, 10), 5, CraftingAspects.quantumWing, new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(BlockRegistry.shield), new ItemStack(BlockRegistry.shield)}); /** Arcane Worktable Recipes **/ @@ -217,9 +226,11 @@ public class RecipeRegistry { christmasFocus = ThaumcraftApi.addArcaneCraftingRecipe("Kris-tmas Focus", new ItemStack(ItemRegistry.christmasFocus), CraftingAspects.christmasFocusCrafting, "XYX", "YZY", "XYX", 'X', new ItemStack(Blocks.snow), 'Y', new ItemStack(Blocks.pumpkin), 'Z', new ItemStack(ConfigItems.itemFocusFrost)); - electricGoggles = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", RandomHelper.getChargedItem(ItemRegistry.electricGoggles, 10), CraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater); + electricGoggles = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", RandomHelper.getChargedItem(ItemRegistry.electricGoggles, 10), CraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', new ItemStack(IC2Items.getItem("reBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE),'B', Items.repeater); + + electricGoggles2 = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", RandomHelper.getChargedItem(ItemRegistry.electricGoggles, 10), CraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater); - shieldBlock = ThaumcraftApi.addArcaneCraftingRecipe("Shield Blocks", new ItemStack(BlockRegistry.shield, 8), CraftingAspects.shieldBlockCrafting, "XYX", "X X", "XYX", 'X', new ItemStack(Blocks.glass), 'Y', new ItemStack(Blocks.obsidian)); + shieldBlock = ThaumcraftApi.addArcaneCraftingRecipe("Shield Block", new ItemStack(BlockRegistry.shield, 6), CraftingAspects.shieldBlockCrafting, "XYX", "X X", "XYX", 'X', new ItemStack(Blocks.glass), 'Y', new ItemStack(Blocks.obsidian)); tinyUranium = ThaumcraftApi.addShapelessArcaneCraftingRecipe("Tiny Uranium", new ItemStack(IC2Items.getItem("smallUran235").getItem(), 7), CraftingAspects.tinyUraniumCrafting, IC2Items.getItem("Uran238")); @@ -279,7 +290,11 @@ public class RecipeRegistry { tripleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 4), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.earthSolars); - portableNode = ThaumcraftApi.addCrucibleRecipe("Portable Node", new ItemStack(BlockRegistry.portableNode), new ItemStack(ConfigItems.itemJarFilled), CraftingAspects.portableNode); + ItemStack itemStack = new ItemStack(ConfigItems.itemJarNode); + ((ItemJarNode)itemStack.getItem()).setAspects(itemStack, new AspectList()); + portableNode = ThaumcraftApi.addCrucibleRecipe("Portable Node", new ItemStack(BlockRegistry.portableNode), itemStack, CraftingAspects.portableNode); + + uuMCrystal = ThaumcraftApi.addCrucibleRecipe("UU-Matter Infusion", new ItemStack(ItemRegistry.itemEMTItems, 1, 15), Ic2Items.uuMatterCell.copy(), CraftingAspects.uuMatterCrystal); /** IC2 Stuff related recipes **/ @@ -417,6 +432,7 @@ public class RecipeRegistry { public static ShapelessArcaneRecipe tinyUranium; public static ShapedArcaneRecipe christmasFocus; public static ShapedArcaneRecipe electricGoggles; + public static ShapedArcaneRecipe electricGoggles2; public static ShapedArcaneRecipe shieldBlock; public static ShapedArcaneRecipe compressedSolar; public static ShapedArcaneRecipe doubleCompressedSolar; @@ -448,6 +464,7 @@ public class RecipeRegistry { public static CrucibleRecipe doubleEarthSolar; public static CrucibleRecipe tripleEarthSolar; public static CrucibleRecipe portableNode; + public static CrucibleRecipe uuMCrystal; public static IRecipe thaumiumPlate; } diff --git a/src/main/java/tombenpotter/emt/common/init/TileRegistry.java b/src/main/java/tombenpotter/emt/common/init/TileRegistry.java index 209dee4..1d9f858 100644 --- a/src/main/java/tombenpotter/emt/common/init/TileRegistry.java +++ b/src/main/java/tombenpotter/emt/common/init/TileRegistry.java @@ -6,7 +6,6 @@ import tombenpotter.emt.common.tile.TileEntityPortableNode; import tombenpotter.emt.common.tile.generators.TileEntityAerGenerator; import tombenpotter.emt.common.tile.generators.TileEntityArborGenerator; import tombenpotter.emt.common.tile.generators.TileEntityAuramGenerator; -import tombenpotter.emt.common.tile.generators.TileEntityEssentiaGenerator; import tombenpotter.emt.common.tile.generators.TileEntityIgnisGenerator; import tombenpotter.emt.common.tile.generators.TileEntityPotentiaGenerator; import tombenpotter.emt.common.tile.solars.air.TileEntityAirSolar; @@ -64,6 +63,5 @@ public class TileRegistry { GameRegistry.registerTileEntity(TileEntityEarthSolar.class, "tileentityearthsolar"); GameRegistry.registerTileEntity(TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar"); GameRegistry.registerTileEntity(TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar"); - GameRegistry.registerTileEntity(TileEntityEssentiaGenerator.class, "tileentityessentiagenerator"); } } diff --git a/src/main/java/tombenpotter/emt/common/items/ItemMaterials.java b/src/main/java/tombenpotter/emt/common/items/ItemMaterials.java index c7995ef..cf949f2 100644 --- a/src/main/java/tombenpotter/emt/common/items/ItemMaterials.java +++ b/src/main/java/tombenpotter/emt/common/items/ItemMaterials.java @@ -42,74 +42,54 @@ public class ItemMaterials extends Item { public String getUnlocalizedName(ItemStack itemstack) { String name = null; switch (itemstack.getItemDamage()) { - case 0: { + case 0: name = "oreClusterUranium"; - break; - } - case 1: { + break; + case 1: name = "crushedOreAmber"; - break; - } - case 2: { + break; + case 2: name = "purifiedOreAmber"; - break; - } - case 3: { + break; + case 3: name = "crushedOreCinnabar"; - break; - } - case 4: { + break; + case 4: name = "purifiedOreCinnabar"; - break; - } - case 5: { + break; + case 5: name = "thaumiumPlate"; - break; - } - case 6: { + break; + case 6: name = "lightningSummoner"; - break; - } - case 7: { + break; + case 7: name = "featherMesh"; - break; - } - case 8: { + break; + case 8: name = "glue"; - break; - } - case 9: { + break; + case 9: name = "ductTape"; - break; - } - case 10: { + break; + case 10: name = "rubberBall"; - break; - } - case 11: { + break; + case 11: name = "cardboard"; - break; - } - case 12: { + break; + case 12: name = "featherGluedCardboardWing"; - break; - } - //case 13: { - // name = "denseIronSheet"; - // break; - //} - case 13: { + break; + case 13: name = "taintedFeather"; - break; - } - case 14: { + break; + case 14: name = "thaumiumWing"; - break; - } - case 15: { + break; + case 15: name = "uumatterDrop"; - break; - } + break; default: name = "nothing"; break; @@ -132,7 +112,6 @@ public class ItemMaterials extends Item { this.icon[10] = ri.registerIcon(ModInformation.texturePath + ":materials/rubberball"); this.icon[11] = ri.registerIcon(ModInformation.texturePath + ":materials/cardboard"); this.icon[12] = ri.registerIcon(ModInformation.texturePath + ":materials/cardboardsheet"); - //this.icon[13] = ri.registerIcon(ModInformation.texturePath + ":materials/denseironsheet"); this.icon[13] = ri.registerIcon(ModInformation.texturePath + ":materials/taintedfeather"); this.icon[14] = ri.registerIcon(ModInformation.texturePath + ":materials/thaumiumWing"); this.icon[15] = ri.registerIcon(ModInformation.texturePath + ":materials/uumatterdrop"); @@ -158,10 +137,10 @@ public class ItemMaterials extends Item { float f = 1.0F; float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f); float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f); - double d = player.prevPosX + ((player.posX - player.prevPosX) * f); - double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; - double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); - Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2); + double playerX = player.prevPosX + ((player.posX - player.prevPosX) * f); + double playerY = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; + double playerZ = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); + Vec3 playerLoc = Vec3.createVectorHelper(playerX, playerY, playerZ); float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); float f5 = -MathHelper.cos(-f1 * 0.01745329F); @@ -170,8 +149,8 @@ public class ItemMaterials extends Item { float f8 = f6; float f9 = f3 * f5; double d3 = 5000D; - Vec3 vec3d1 = vec3d.addVector(f7 * d3, f8 * d3, f9 * d3); - MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(vec3d, vec3d1, true); + Vec3 vec3d1 = playerLoc.addVector(f7 * d3, f8 * d3, f9 * d3); + MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(playerLoc, vec3d1, true); if (movingobjectposition == null) { return stack; } @@ -206,4 +185,4 @@ public class ItemMaterials extends Item { } } } -} +} \ No newline at end of file diff --git a/src/main/java/tombenpotter/emt/common/items/armor/chestplates/ItemInfusedQuantumChestplate.java b/src/main/java/tombenpotter/emt/common/items/armor/chestplates/ItemInfusedQuantumChestplate.java index 7773631..a9b215e 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/chestplates/ItemInfusedQuantumChestplate.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/chestplates/ItemInfusedQuantumChestplate.java @@ -73,6 +73,12 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { IIcon icon4; Random rnd; + public final byte NONE = 0; + public final byte JETPACK = 1; + public final byte THAUMIUM = 2; + public final byte NANO = 3; + public final byte QUANTUM = 4; + protected static final Map potionRemovalCost = new HashMap(); public static AudioSource audioSource; private static boolean lastJetpackUsed = false; @@ -87,8 +93,10 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { rnd = new Random(); } + @SideOnly(Side.CLIENT) + @Override public void registerIcons(IIconRegister iconRegister) { icon0 = iconRegister.registerIcon(ModInformation.texturePath + ":armor/armor_quantum_chest"); icon1 = iconRegister.registerIcon(ModInformation.texturePath + ":armor/armor_quantum_chest_jetpack"); @@ -97,6 +105,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { icon4 = iconRegister.registerIcon(ModInformation.texturePath + ":armor/armor_quantum_chest_wing_q"); } + @SubscribeEvent public void onEntityLivingFallEvent(LivingFallEvent event) { if ((IC2.platform.isSimulating()) && ((event.entity instanceof EntityLivingBase))) { @@ -112,39 +121,41 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { } } } + + @Override public double getDamageAbsorptionRatio() { return 1.1D; } - private double getBaseAbsorptionRatio() { - return 0.15D; - } + @Override public int getEnergyPerDamage() { return 20000; } + @SideOnly(Side.CLIENT) + @Override public EnumRarity getRarity(ItemStack stack) { return EnumRarity.rare; } + + @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { NBTTagCompound nbt = StackUtil.getOrCreateNbtData(itemStack); byte toggleTimer = nbt.getByte("toggleTimer"); boolean ret = false; - - boolean jetpack = nbt.getBoolean("jetpack"); boolean hoverMode = nbt.getBoolean("hoverMode"); boolean jetpackUsed = false; - String useother = nbt.getString("useother"); + byte wing = nbt.getByte("wing"); if(!world.isRemote){ - if(!useother.equals("TW") && !useother.equals("NW") && !useother.equals("QW") && !useother.equals("Jetpack") && !useother.equals("None")){ - nbt.setString("useother", "None"); + if(wing == 0){ + nbt.setByte("wing", NONE); } if ((IC2.keyboard.isJumpKeyDown(player)) && (IC2.keyboard.isModeSwitchKeyDown(player)) && (toggleTimer == 0)) { @@ -163,12 +174,10 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { } } - if(player.inventory.getCurrentItem() != null && player.isSneaking() && toggleTimer == 0 && useother.equals("None")){ + if(player.inventory.getCurrentItem() != null && player.isSneaking() && toggleTimer == 0 && wing == NONE){ if(player.inventory.getCurrentItem().getItem() == IC2Items.getItem("electricJetpack").getItem()){ - nbt.setBoolean("jetpack", true); IC2.platform.messagePlayer(player, "Jetpack enabled.", new Object[0]); - - nbt.setString("useother", "Jetpack"); + nbt.setByte("wing", JETPACK); int charge = (int)ElectricItem.manager.getCharge(itemStack); if(ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < 30000){ ElectricItem.manager.use(itemStack, 30000 - ElectricItem.manager.getCharge(player.inventory.getCurrentItem()), player); @@ -180,13 +189,13 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { else if(player.inventory.getCurrentItem().getItem() == ItemRegistry.thaumiumWing){ IC2.platform.messagePlayer(player, "Thaumium wings enabled.", new Object[0]); - nbt.setString("useother", "TW"); + nbt.setByte("wing", THAUMIUM); player.inventory.setInventorySlotContents(player.inventory.currentItem, null); } else if(player.inventory.getCurrentItem().getItem() == ItemRegistry.nanoWing){ IC2.platform.messagePlayer(player, "Nano wings enabled.", new Object[0]); - nbt.setString("useother", "NW"); + nbt.setByte("wing", NANO); int charge = (int)ElectricItem.manager.getCharge(itemStack); if(ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < ItemNanoWing.maxCharge){ ElectricItem.manager.use(itemStack, ItemNanoWing.maxCharge - ElectricItem.manager.getCharge(player.inventory.getCurrentItem()), player); @@ -197,7 +206,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { else if(player.inventory.getCurrentItem().getItem() == ItemRegistry.quantumWing){ IC2.platform.messagePlayer(player, "Quantum wings enabled.", new Object[0]); - nbt.setString("useother", "QW"); + nbt.setByte("wing", QUANTUM); int charge = (int)ElectricItem.manager.getCharge(itemStack); if(ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < ItemQuantumWing.maxCharge){ ElectricItem.manager.use(itemStack, ItemQuantumWing.maxCharge - ElectricItem.manager.getCharge(player.inventory.getCurrentItem()), player); @@ -210,9 +219,9 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { if(player.inventory.getCurrentItem() == null && nbt.getBoolean("unequip") && player.isSneaking() && toggleTimer == 0 && IC2.platform.isSimulating()){ toggleTimer = 30; - if(useother.equals("Jetpack")){ + if(wing == JETPACK){ IC2.platform.messagePlayer(player, "Jetpack disabled.", new Object[0]); - nbt.setString("useother", "None"); + nbt.setByte("wing", NONE); ItemStack charged = new ItemStack(IC2Items.getItem("electricJetpack").getItem()); if(nbt.getInteger("jetpackCharge") > 0) ElectricItem.manager.charge(charged, nbt.getInteger("jetpackCharge"), 1, true, false); @@ -221,15 +230,15 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); } - if(useother.equals("TW")){ + if(wing == THAUMIUM){ IC2.platform.messagePlayer(player, "Thaumium wings disabled.", new Object[0]); - nbt.setString("useother", "None"); + nbt.setByte("wing", NONE); player.inventory.setInventorySlotContents(player.inventory.currentItem, new ItemStack(ItemRegistry.thaumiumWing)); } - if(useother.equals("NW")){ + if(wing == NANO){ IC2.platform.messagePlayer(player, "Nano wings disabled.", new Object[0]); - nbt.setString("useother", "None"); + nbt.setByte("wing", NONE); ItemStack charged = new ItemStack(ItemRegistry.nanoWing); if(nbt.getInteger("NWCharge") > 0) ElectricItem.manager.charge(charged, nbt.getInteger("NWCharge"), 3, true, false); @@ -238,9 +247,9 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); } - if(useother.equals("QW")){ + if(wing == QUANTUM){ IC2.platform.messagePlayer(player, "Quantum wings disabled.", new Object[0]); - nbt.setString("useother", "None"); + nbt.setByte("wing", NONE); ItemStack charged = new ItemStack(ItemRegistry.quantumWing); if(nbt.getInteger("QWCharge") > 0) ElectricItem.manager.charge(charged, nbt.getInteger("QWCharge"), 3, true, false); @@ -250,19 +259,18 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { } nbt.setBoolean("unequip", false); - } } - if ((IC2.keyboard.isJumpKeyDown(player) && useother.equals("Jetpack")) || (hoverMode && player.motionY < -0.029999999329447746D)) { + if ((IC2.keyboard.isJumpKeyDown(player) && wing == JETPACK) || (hoverMode && player.motionY < -0.029999999329447746D)) { jetpackUsed = useJetpack(player, hoverMode, itemStack); } - if(useother.equals("TW")) + if(wing == THAUMIUM) useWings(player, itemStack, world, 0.15f, 0.7f, 0.5f, 0, false); - if(useother.equals("NW")) + if(wing == NANO) useWings(player, itemStack, world, 0.25f, 0.6f, 0.3f, 5, true); - if(useother.equals("QW")) + if(wing == QUANTUM) useWings(player, itemStack, world, 0.33f, 0.5f, 0.2f, 7, true); @@ -299,45 +307,42 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { } } + @SideOnly(Side.CLIENT) @Override public IIcon getIconIndex(ItemStack stack){ try{ - String useother = stack.stackTagCompound.getString("useother"); + byte wing = stack.stackTagCompound.getByte("wing"); - if(useother.equals("Jetpack")) - return icon1; - if(useother.equals("TW")) - return icon2; - if(useother.equals("NW")) - return icon3; - if(useother.equals("QW")) - return icon4; - - return icon0; + switch(wing){ + case JETPACK : return icon1; + case THAUMIUM : return icon2; + case NANO : return icon3; + case QUANTUM : return icon4; + default : return icon0; + } } catch(Exception ex){return icon0;} } + @Override public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining){ try{ - String useother = stack.stackTagCompound.getString("useother"); + byte wing = stack.stackTagCompound.getByte("wing"); - if(useother.equals("Jetpack")) - return icon1; - if(useother.equals("TW")) - return icon2; - if(useother.equals("NW")) - return icon3; - if(useother.equals("QW")) - return icon4; - - return icon0; + switch(wing){ + case JETPACK : return icon1; + case THAUMIUM : return icon2; + case NANO : return icon3; + case QUANTUM : return icon4; + default : return icon0; + } } catch(Exception e){return icon0;} } + @Override public int getItemEnchantability() { if (ConfigHandler.enchanting == false) { @@ -347,33 +352,33 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { } } + @Override @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - String useother = stack.stackTagCompound.getString("useother"); + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + byte wing = stack.stackTagCompound.getByte("wing"); - if(useother.equals("Jetpack")) - return ModInformation.texturePath + ":textures/models/quantum_jetpack.png"; - if(useother.equals("TW")) - return ModInformation.texturePath + ":textures/models/quantum_wings_t.png"; - if(useother.equals("NW")) - return ModInformation.texturePath + ":textures/models/quantum_wings_n.png"; - if(useother.equals("QW")) - return ModInformation.texturePath + ":textures/models/quantum_wings_q.png"; - return ModInformation.texturePath + ":textures/models/quantum.png"; + switch(wing){ + case JETPACK : return ModInformation.texturePath + ":textures/models/quantum_jetpack.png"; + case THAUMIUM : return ModInformation.texturePath + ":textures/models/quantum_wings_t.png"; + case NANO : return ModInformation.texturePath + ":textures/models/quantum_wings_n.png"; + case QUANTUM : return ModInformation.texturePath + ":textures/models/quantum_wings_q.png"; + default : return ModInformation.texturePath + ":textures/models/quantum.png"; + } } + @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { try{ if(entity instanceof EntityPlayer){ - String useother = stack.stackTagCompound.getString("useother"); - if(useother.equals("Jetpack")){ + byte wing = stack.stackTagCompound.getByte("wing"); + if(wing == JETPACK){ ModelCpecialArmor mbm = new ModelCpecialArmor(1, 1); return mbm; } - if(useother.equals("TW") || useother.equals("NW") || useother.equals("QW")){ + else if(wing != 0){ ModelCpecialArmor mbm = new ModelCpecialArmor(1, 2); mbm.isJumping = stack.stackTagCompound.getBoolean("isJumping"); return mbm; @@ -384,22 +389,21 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { return new ModelCpecialArmor(1, 0); } + @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { try{ - String useother = stack.stackTagCompound.getString("useother"); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + tier); } catch(NullPointerException e){} } + public boolean useJetpack(EntityPlayer player, boolean hoverMode, ItemStack stack) { int jetpackMaxCharge = 30000; - ItemStack jetpack = stack; if (ElectricItem.manager.getCharge(stack) <= 0) return false; - float power = 1.0F; float dropPercentage = 0.05F; if (((float)ElectricItem.manager.getCharge(stack) / (float)jetpackMaxCharge) <= dropPercentage){ @@ -447,13 +451,13 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { consume = 10.0D; } ElectricItem.manager.use(stack, consume, player); - player.fallDistance = 0.0F; player.distanceWalkedModified = 0.0F; IC2.platform.resetPlayerInAirTime(player); return true; } + void useWings(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount, boolean isElectric){ NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack); @@ -477,19 +481,14 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { } nbtData.setInteger("f", 0); } - if (nbtData.getBoolean("isJumping") && !player.onGround && player.motionY < 0) player.motionY *= f1; - if (player.isInWater() && !player.capabilities.isCreativeMode) player.motionY += -0.2; - if(ConfigHandler.impactOfRain){ if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode) player.motionY = -0.3; } if (player.isSneaking() && !player.onGround) player.motionY = -0.6; - if (player.fallDistance > 0.0F) player.fallDistance = 0; - } } \ No newline at end of file diff --git a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerators.java b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerators.java index 6896fb9..8c403f1 100644 --- a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerators.java +++ b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerators.java @@ -7,6 +7,13 @@ import net.minecraft.item.ItemStack; import java.util.List; +import tombenpotter.emt.common.tile.generators.TileEntityAerGenerator; +import tombenpotter.emt.common.tile.generators.TileEntityArborGenerator; +import tombenpotter.emt.common.tile.generators.TileEntityAuramGenerator; +import tombenpotter.emt.common.tile.generators.TileEntityIgnisGenerator; +import tombenpotter.emt.common.tile.generators.TileEntityPotentiaGenerator; +import tombenpotter.emt.common.util.ConfigHandler; + public class ItemBlockEssentiaGenerators extends ItemBlock { public ItemBlockEssentiaGenerators(Block id) { @@ -18,39 +25,37 @@ public class ItemBlockEssentiaGenerators extends ItemBlock { public String getUnlocalizedName(ItemStack itemstack) { String name = ""; switch (itemstack.getItemDamage()) { - case 0: { - name = "potentia"; - break; - } - case 1: { - name = "ignis"; - break; - } - case 2: { - name = "auram"; - break; - } - case 3: { - name = "arbor"; - break; - } - case 4: { - name = "aer"; - break; - } - default: - name = "nothing"; + case 0: name = "potentia"; + break; + case 1: name = "ignis"; + break; + case 2: name = "auram"; + break; + case 3: name = "arbor"; + break; + case 4: name = "aer"; + break; + default: name = "nothing"; } return getUnlocalizedName() + "." + name; } @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - list.add("Going away next version."); + switch(stack.getItemDamage()){ + case 0 : list.add(ConfigHandler.potentiaGenerator + " EU/t"); + break; + case 1 : list.add(ConfigHandler.ignisGenerator + " EU/t"); + break; + case 2 : list.add(ConfigHandler.auramGenerator + " EU/t"); + break; + case 3 : list.add(ConfigHandler.arborGenerator + " EU/t"); + break; + case 4 : list.add(ConfigHandler.aerGenerator + " EU/t"); + break; + } } @Override - public int getMetadata(int meta) { - return meta; - } + public int getMetadata(int meta) {return meta;} } diff --git a/src/main/java/tombenpotter/emt/common/tile/TileEntityToolRefiller.java b/src/main/java/tombenpotter/emt/common/tile/TileEntityToolRefiller.java deleted file mode 100644 index a2c5243..0000000 --- a/src/main/java/tombenpotter/emt/common/tile/TileEntityToolRefiller.java +++ /dev/null @@ -1,4 +0,0 @@ -package tombenpotter.emt.common.tile; - -public class TileEntityToolRefiller extends TileEntityEMT { -} diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAerGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAerGenerator.java index 8ee0ae0..6ebf00d 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAerGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAerGenerator.java @@ -1,6 +1,7 @@ package tombenpotter.emt.common.tile.generators; import thaumcraft.api.aspects.Aspect; +import tombenpotter.emt.common.util.ConfigHandler; import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityAerGenerator extends TileEntityBaseGenerator { @@ -8,5 +9,6 @@ public class TileEntityAerGenerator extends TileEntityBaseGenerator { public TileEntityAerGenerator() { aspect = Aspect.AIR; EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.aerGenerator; } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityArborGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityArborGenerator.java index cd8208d..b9be0c4 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityArborGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityArborGenerator.java @@ -1,6 +1,7 @@ package tombenpotter.emt.common.tile.generators; import thaumcraft.api.aspects.Aspect; +import tombenpotter.emt.common.util.ConfigHandler; import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityArborGenerator extends TileEntityBaseGenerator { @@ -8,5 +9,6 @@ public class TileEntityArborGenerator extends TileEntityBaseGenerator { public TileEntityArborGenerator() { aspect = Aspect.TREE; EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.arborGenerator; } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAuramGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAuramGenerator.java index 7662e28..00052a7 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAuramGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAuramGenerator.java @@ -1,6 +1,7 @@ package tombenpotter.emt.common.tile.generators; import thaumcraft.api.aspects.Aspect; +import tombenpotter.emt.common.util.ConfigHandler; import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityAuramGenerator extends TileEntityBaseGenerator { @@ -8,5 +9,6 @@ public class TileEntityAuramGenerator extends TileEntityBaseGenerator { public TileEntityAuramGenerator() { aspect = Aspect.AURA; EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.auramGenerator; } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityBaseGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityBaseGenerator.java index dd4e5ca..3ac796b 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityBaseGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityBaseGenerator.java @@ -10,33 +10,30 @@ import tombenpotter.emt.common.util.ConfigHandler; public abstract class TileEntityBaseGenerator extends TileEntityEMT { - public static int waitTime; public BasicSource energySource = new BasicSource(this, 1000000000, 3); public Aspect aspect; - public double output; + public int output; + public int tick = 0; public TileEntityBaseGenerator() { - waitTime = 30; - output = 0; + output = 20; } @Override public void updateEntity() { - energySource.updateEntity(); - - if (waitTime > 0) { - waitTime--; - } - - if (waitTime <= 0) { - createEnergy(); - waitTime = ConfigHandler.essentiaGeneratorsDelay; - } + if(tick > 0) + tick--; + + if(tick == 0){ + energySource.updateEntity(); + createEnergy(); + tick = 20; + } } public void createEnergy() { if (!this.worldObj.isRemote && EssentiaHandler.drainEssentia(this, aspect, ForgeDirection.UNKNOWN, 8)) { - energySource.addEnergy(output); + energySource.addEnergy(output * 20); } } @@ -62,4 +59,8 @@ public abstract class TileEntityBaseGenerator extends TileEntityEMT { super.writeToNBT(tag); energySource.writeToNBT(tag); } + + public int getOutput(){ + return output; + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityEssentiaGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityEssentiaGenerator.java deleted file mode 100644 index 54fc0fa..0000000 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityEssentiaGenerator.java +++ /dev/null @@ -1,73 +0,0 @@ -package tombenpotter.emt.common.tile.generators; - -import ic2.api.energy.prefab.BasicSource; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.common.lib.events.EssentiaHandler; -import tombenpotter.emt.common.tile.TileEntityEMT; -import tombenpotter.emt.common.util.ConfigHandler; -import tombenpotter.emt.common.util.EssentiasOutputs; - -public class TileEntityEssentiaGenerator extends TileEntityEMT { - - public String[] aspects = new String[4]; - public boolean[] isFree = new boolean[4]; - public static int waitTime; - public BasicSource energySource = new BasicSource(this, 1000000000, 3); - - public TileEntityEssentiaGenerator() { - waitTime = 30; - for (int i = 0; i < aspects.length; i++) { - aspects[i] = String.valueOf(i); - isFree[i] = true; - } - } - - public void updateEntity() { - energySource.updateEntity(); - if (waitTime > 0) { - waitTime--; - } - - if (waitTime <= 0 && !worldObj.isRemote) { - for (int i = 0; i < aspects.length; i++) { - if (EssentiaHandler.drainEssentia(this, Aspect.getAspect(aspects[i]), ForgeDirection.UNKNOWN, 8)) { - energySource.addEnergy(EssentiasOutputs.outputs.get(aspects[i])); - } - } - waitTime = ConfigHandler.essentiaGeneratorsDelay; - } - } - - @Override - public void readFromNBT(NBTTagCompound tag) { - super.readFromNBT(tag); - energySource.readFromNBT(tag); - for (int i = 0; i < aspects.length; i++) { - this.aspects[i] = tag.getString("aspect" + String.valueOf(i)); - this.isFree[i] = tag.getBoolean("isFree" + String.valueOf(i)); - } - } - - @Override - public void writeToNBT(NBTTagCompound tag) { - super.writeToNBT(tag); - energySource.writeToNBT(tag); - for (int i = 0; i < aspects.length; i++) { - tag.setString("aspect" + String.valueOf(i), this.aspects[i]); - tag.setBoolean("isFree" + String.valueOf(i), this.isFree[i]); - } - } - - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } - - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } -} diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityIgnisGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityIgnisGenerator.java index 7241f72..644561c 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityIgnisGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityIgnisGenerator.java @@ -1,6 +1,7 @@ package tombenpotter.emt.common.tile.generators; import thaumcraft.api.aspects.Aspect; +import tombenpotter.emt.common.util.ConfigHandler; import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityIgnisGenerator extends TileEntityBaseGenerator { @@ -8,5 +9,6 @@ public class TileEntityIgnisGenerator extends TileEntityBaseGenerator { public TileEntityIgnisGenerator() { aspect = Aspect.FIRE; EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.ignisGenerator; } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityPotentiaGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityPotentiaGenerator.java index 1541a88..8564ff3 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityPotentiaGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityPotentiaGenerator.java @@ -1,6 +1,8 @@ package tombenpotter.emt.common.tile.generators; +import ic2.api.energy.prefab.BasicSource; import thaumcraft.api.aspects.Aspect; +import tombenpotter.emt.common.util.ConfigHandler; import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityPotentiaGenerator extends TileEntityBaseGenerator { @@ -8,5 +10,6 @@ public class TileEntityPotentiaGenerator extends TileEntityBaseGenerator { public TileEntityPotentiaGenerator() { aspect = Aspect.ENERGY; EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.potentiaGenerator; } } diff --git a/src/main/java/tombenpotter/emt/common/util/ConfigHandler.java b/src/main/java/tombenpotter/emt/common/util/ConfigHandler.java index 5734568..ff857e2 100644 --- a/src/main/java/tombenpotter/emt/common/util/ConfigHandler.java +++ b/src/main/java/tombenpotter/emt/common/util/ConfigHandler.java @@ -14,13 +14,18 @@ public class ConfigHandler { public static String VALUES = "Numeric Values"; public static String OUTPUTS = "Essentia Generator Outputs"; - public static int essentiaGeneratorsDelay; public static int etherealProcessorBaseSpeed; public static int etherealProcessorBonus; public static int chargeFocusProduction; public static int armorBaubleProduction; public static int inventoryBaubleProdution; public static int wandChargeFocusCost; + + public static int aerGenerator; + public static int arborGenerator; + public static int auramGenerator; + public static int ignisGenerator; + public static int potentiaGenerator; // values public static double wandChargerConsumption; @@ -141,7 +146,6 @@ public class ConfigHandler { compressedSolarOutput = config.get(VALUES, "Compressed Solar Panel Output", 10, "This is the number you have to modify if you want to make the Compressed Solar Panel yield " + "more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(compressedSolarOutput); doubleCompressedSolarOutput = config.get(VALUES, "Double Compressed Solar Panel Output", 100, "This is the number you have to modify if you want to make the Double Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(doubleCompressedSolarOutput); tripleCompressedSolarOutput = config.get(VALUES, "Triple Compressed Solar Panel Output", 1000, "This is the number you have to modify if you want to make the Triple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(tripleCompressedSolarOutput); - essentiaGeneratorsDelay = config.get(VALUES, "Essentia Generators draw rate", 120, "The number of ticks the Essentia Generators wait before using 2 Essentia. " + "If you want them to be slower, increase the number.").getInt(essentiaGeneratorsDelay); nanoBootsSpeed = config.get(VALUES, "Nano Boots of the Traveller Speed", 0.25, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsSpeed); quantumBootsSpeed = config.get(VALUES, "Quantum Boots of the Traveller Speed", 0.5, "Watch out, that goes up REALLY quickly.").getDouble(quantumBootsSpeed); nanoBootsJump = config.get(VALUES, "Nano Boots of the Traveller jump", 0.6, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); @@ -152,6 +156,12 @@ public class ConfigHandler { armorBaubleProduction = config.get(VALUES, "Armor Charging Ring production", 32, "Default is 32").getInt(); inventoryBaubleProdution = config.get(VALUES, "Inventory Charging Ring production", 32, "Default is 32").getInt(); wandChargeFocusCost = config.get(VALUES, "Wand Focus: Wand Charging Cost", 40000, "Default is 40000").getInt(); + + aerGenerator = config.get(VALUES, "Aer generator", 300, "EU/t").getInt(); + auramGenerator = config.get(VALUES, "Auram generator", 400, "EU/t").getInt(); + arborGenerator = config.get(VALUES, "Arbor generator", 450, "EU/t").getInt(); + ignisGenerator = config.get(VALUES, "Ignis generator", 400, "EU/t").getInt(); + potentiaGenerator = config.get(VALUES, "Potentia generator", 200, "EU/t").getInt(); thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Drill", false).getBoolean(thaumiumDrillResearch); thaumiumChainsawResearch = config.get(RESEARCH, "Thaumium Chainsaw", false).getBoolean(thaumiumChainsawResearch); diff --git a/src/main/java/tombenpotter/emt/common/util/CraftingAspects.java b/src/main/java/tombenpotter/emt/common/util/CraftingAspects.java index 96dbabe..46ea8ca 100644 --- a/src/main/java/tombenpotter/emt/common/util/CraftingAspects.java +++ b/src/main/java/tombenpotter/emt/common/util/CraftingAspects.java @@ -53,4 +53,5 @@ public class CraftingAspects { public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32); public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 48); public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.AIR, 8); + public static AspectList uuMatterCrystal = new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.AIR, 8).add(Aspect.CRYSTAL, 16).add(Aspect.COLD, 32).add(Aspect.MAGIC, 8); } diff --git a/src/main/java/tombenpotter/emt/common/util/EMTResearch.java b/src/main/java/tombenpotter/emt/common/util/EMTResearch.java index ca33c10..a676996 100644 --- a/src/main/java/tombenpotter/emt/common/util/EMTResearch.java +++ b/src/main/java/tombenpotter/emt/common/util/EMTResearch.java @@ -280,7 +280,7 @@ public class EMTResearch { if (!ConfigHandler.uuMInfusionResearch) { new EMTResearchItem("UU-Matter Infusion", "EMT", ResearchAspects.uuMInfusion, 5, 5, 3, new ItemStack(ItemRegistry.itemEMTItems, 1, 15)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.charcoalToCoal), new ResearchPage(RecipeRegistry.glowstoneDustToBlock), new ResearchPage(RecipeRegistry.stoneBricksToIronOre), new ResearchPage(RecipeRegistry.arcaneStoneToCopperOre), new ResearchPage(RecipeRegistry.arcaneStoneBricksToTinOre), new ResearchPage(RecipeRegistry.amberBlockToLeadOre), new ResearchPage(RecipeRegistry.amberBricksToUraniumOre), new ResearchPage(RecipeRegistry.shardToResin), new ResearchPage(RecipeRegistry.shardToRedstone), new ResearchPage(RecipeRegistry.shardToLapis), new ResearchPage(RecipeRegistry.ironToGold), new ResearchPage(RecipeRegistry.goldToDiamond), new ResearchPage(RecipeRegistry.diamondToUranium), new ResearchPage(RecipeRegistry.uraniumToIridium)); + .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.uuMCrystal), new ResearchPage(RecipeRegistry.charcoalToCoal), new ResearchPage(RecipeRegistry.glowstoneDustToBlock), new ResearchPage(RecipeRegistry.stoneBricksToIronOre), new ResearchPage(RecipeRegistry.arcaneStoneToCopperOre), new ResearchPage(RecipeRegistry.arcaneStoneBricksToTinOre), new ResearchPage(RecipeRegistry.amberBlockToLeadOre), new ResearchPage(RecipeRegistry.amberBricksToUraniumOre), new ResearchPage(RecipeRegistry.shardToResin), new ResearchPage(RecipeRegistry.shardToRedstone), new ResearchPage(RecipeRegistry.shardToLapis), new ResearchPage(RecipeRegistry.ironToGold), new ResearchPage(RecipeRegistry.goldToDiamond), new ResearchPage(RecipeRegistry.diamondToUranium), new ResearchPage(RecipeRegistry.uraniumToIridium)); } if (!ConfigHandler.portableNodeResarch) { diff --git a/src/main/resources/assets/electromagictools/lang/en_US.lang b/src/main/resources/assets/electromagictools/lang/en_US.lang index 5f82ecb..80aeddb 100644 --- a/src/main/resources/assets/electromagictools/lang/en_US.lang +++ b/src/main/resources/assets/electromagictools/lang/en_US.lang @@ -220,7 +220,7 @@ emt.rsname.Shield Focus=Shield Focus emt.text.Shield Focus=With some experimentation with the Portable Hole, you have found out more about the transportation of objects to alternate dimensions. You believe you can reverse these effects to summon a swath of blocks from a dimension full of matter to shield you from any oncoming disaster. Caution is to be taken when using this focus, as when bringing these blocks into our dimension, it will transpose any blocks in the way into the dimension it came from, never to return again. You will also be unable to move while this shield is in existence. emt.rsname.Potentia Generator=Potentia Generator -emt.text.Potentia Generator=After much studying and research, you have finally discovered how to create electricity from your leftover Essentia.

This Generator will produce between 3000 and 3500 EU per unit of Potentia, making it very efficient. Simply place a Warded Jar containing Potentia in a 8 blocks radius of the machine and it will draw it in to create EU.

While Potentia seems like the most logical choice for producing Essentia with EU, you believe you will be able to generate electricity from different Essentia in the near future with a bit of tinkering. +emt.text.Potentia Generator=After much studying and research, you have finally discovered how to create electricity from your leftover Essentia.

Simply place a Warded Jar containing Potentia in a 8 blocks radius of the machine and it will draw it in to create EU.

While Potentia seems like the most logical choice for producing Essentia with EU, you believe you will be able to generate electricity from different Essentia in the near future with a bit of tinkering. emt.rsname.Ignis Generator=Ignis Generator emt.text.Ignis Generator=Just as you thought, with a bit of tweaking, you have found a way to instead use Ignis Essentia to produce power. On the inside, this machine is able to heat water by consuming Ignis. The steam produced by this heat then spins the turbines, similar to a typical Generator. @@ -232,7 +232,7 @@ emt.rsname.Arbor Generator=Arbor Generator emt.text.Arbor Generator=You always seem to have excess Arbor Essentia sitting around. Not anymore! By modifying your original Potentia Generator, you have found a way to produce energy using Arbor Essentia instead. emt.rsname.Aer Generator=Aer Generator -emt.text.Aer Generator=You have discovered the enormous power of the air, and therefore decided to try out a modification of your original Potentia Generator capable of compressing air from Aer Essentia in a nearby jar, giving you 300 EU per unit. +emt.text.Aer Generator=You have discovered the enormous power of the air, and therefore decided to try out a modification of your original Potentia Generator capable of compressing air from Aer Essentia in a nearby jar. emt.rsname.Chainsaw of the Stream=Chainsaw of the Stream emt.text.Chainsaw of the Stream=After studying both the Axe of the Stream and the Thaumium Chainsaw, you managed to combine most of their abilities, resulting in an electric tool that can chop down whole trees without much effort. diff --git a/src/main/resources/assets/electromagictools/lang/ru_RU.lang b/src/main/resources/assets/electromagictools/lang/ru_RU.lang index 3acbee8..cf2c841 100644 --- a/src/main/resources/assets/electromagictools/lang/ru_RU.lang +++ b/src/main/resources/assets/electromagictools/lang/ru_RU.lang @@ -176,7 +176,7 @@ emt.text.Shield Focus=После некоторых экспериментов emt.rsname.Potentia Generator=Potentia генератор emt.tag.Potentia Generator=Освоение производящего потенциала эссенции -emt.text.Potentia Generator=После долгих изучений и исследований, Вы, наконец-то, узнали как получить электричество от остатков эссенции.

Этот генератор будет производить от 3000 до 3500 EU за одну единицу Potentia, что делает его очень эффективным. Просто поместите банку, содержащую Potentia, в радиусе 8 блоков от механизма и она заставит его вырабатывать EU.

Хотя Potentia кажется наиболее логичным выбором для производства EU с помощью эссенции, Вы уверены, что Вы сможете производить электричество из различных эссенций в ближайшем будущем. +emt.text.Potentia Generator=После долгих изучений и исследований, Вы, наконец-то, узнали как получить электричество от остатков эссенции.

Просто поместите банку, содержащую Potentia, в радиусе 8 блоков от механизма и она заставит его вырабатывать EU.

Хотя Potentia кажется наиболее логичным выбором для производства EU с помощью эссенции, Вы уверены, что Вы сможете производить электричество из различных эссенций в ближайшем будущем. emt.rsname.Ignis Generator=Ignis генератор emt.tag.Ignis Generator=Если Вы не можете справиться с жаром...