Compare commits

..
51 Commits
Author SHA1 Message Date
Martin Robertz a97a032210 Merge pull request #5 from GTNewHorizons/oneRingRework
Redid some stuff on the one ring, mostly to prevent problems with pla…
2018-02-07 20:38:57 +01:00
Namikon 956fb3dca8 Redid some stuff on the one ring, mostly to prevent problems with player profiles. 2018-02-07 12:49:17 +01:00
Martin Robertz cf16727366 Merge pull request #4 from GTNewHorizons/devBootsFix
Possible solution for GTNewHorizons/NewHorizons#2535
2018-01-31 17:38:31 +01:00
Namikon 93a0751493 Possible solution for GTNewHorizons/NewHorizons#2535 2018-01-31 12:15:54 +01:00
Dream-Master 14115778d0 removed unused imports 2017-07-24 13:01:19 +02:00
Dream-Master cb5ba100bf unused import remove. Jenkins not building 2017-06-16 09:40:42 +02:00
fewizz 6c0f4cffa0 Close #35 , Close #36 2017-06-15 19:01:02 +02:00
fewizz 91fb7afded Close #35 , Close #36 2017-06-14 11:17:28 +03:00
Hazeev Aidar 96d86b67f9 Merge pull request #33 from GTNewHorizons/master
Make Wings have so much Eu Charge then IC2 Armor
2017-06-14 09:40:12 +03:00
Daniel 0e82f8617b Poison instead? 2017-05-29 09:16:30 +02:00
Daniel cb086bbb11 Well it never incremented it. 2017-05-29 09:00:19 +02:00
Daniel 3fa79927a4 that should remain 2017-05-29 08:55:01 +02:00
Daniel 9ad8b01686 Remove invincibility. 2017-05-29 07:31:17 +02:00
Technus 3467c41bef Merge branch 'master' of https://github.com/GTNewHorizons/Electro-Magic-Tools
# Conflicts:
#	src/api/java/baubles/api/package-info.java
2017-01-15 21:29:11 +01:00
Technus ac7b3e0b7d rework 2017-01-15 21:28:06 +01:00
Technus 31cd1cb543 Revert "optimize imports"
This reverts commit 62438e890a.
2017-01-15 20:26:57 +01:00
Dream-Master 860162cb6f this should work !? 2017-01-15 17:55:14 +01:00
Dream-Master 16c7a830a6 This should work 2017-01-15 17:30:44 +01:00
Martin Robertz dccd62b33a Update README.md 2017-01-15 16:30:56 +01:00
Dream-Master 03e9deebdc bump version 2017-01-15 16:26:17 +01:00
Technus 62438e890a optimize imports 2017-01-09 09:46:35 +01:00
Technus 37bb2991a3 Fix boots 2016-11-05 16:14:53 +01:00
Technus d4ec5b5ec3 Unify to other armors 2016-11-05 15:51:46 +01:00
Technus 56e8993f03 Unused 2016-11-05 15:22:01 +01:00
Technus e2f20373e6 Fix tiering 2016-11-05 14:59:25 +01:00
Technus b7d30223a0 Equalize armor absorption values with IC2 2016-11-05 14:43:14 +01:00
Technus 7b5782af5d Fix for solars, and equalized armors with IC2 2016-11-05 14:11:24 +01:00
Dream-Master 6378580b31 Hammer have more charge 2016-11-04 23:12:46 +01:00
Dream-Master 108966a079 more changes 2016-11-04 23:09:13 +01:00
Dream-Master 8724b77039 bump version 2016-11-04 22:49:26 +01:00
Dream-Master 5c7d87498c try to change a bit the values
@technus could need help here
2016-11-04 22:48:40 +01:00
Dream-Master 2f9c2746b4 bump version 2016-10-30 19:27:49 +01:00
Dream-Master e91f77ca96 remove my crapy code 2016-10-30 17:38:19 +01:00
Dream-Master d18f9730a8 Merge remote-tracking branch 'upstream/master'
Conflicts:
	build.properties
	src/main/java/emt/item/armor/wings/ItemFeatherWing.java
2016-10-30 17:36:04 +01:00
Dream-Master cbbd68031b change back transer limit 2016-10-30 17:29:38 +01:00
Dream-Master 47942e17e3 bump version 2016-10-30 17:27:12 +01:00
Dream-Master 6ab4c94ed8 Make the max Charge values even with ic2 2016-10-30 17:26:53 +01:00
fewizz 3f724c34ad Small nerf 2016-10-30 17:05:28 +01:00
fewizz 38d769e384 1.2.6.2 2016-10-13 23:29:42 +02:00
fewizz 9048436bf1 Small nerf 2016-10-13 20:34:34 +03:00
fewizz 3ac6826e6c Fixed wings (?) 2016-10-13 20:29:40 +03:00
Dream-Master be9af968b9 bump Version 2016-10-13 17:55:34 +02:00
Dream-Master 30d0534377 duct tape solution.
Tested if i jump with no Armor i died.
Featherwings 2,5 Hearts left = 25% damage reduction
Thaumium Wings 5 Hearts left = 50% damage reduction
Nano Wings 7,5 Hearts left = 75% damage reduction
Quantum Wings 10 Hearts left = 100% damage reduction
2016-10-13 17:55:15 +02:00
fewizz 9c4f0034fb Whoops 2016-10-13 16:36:08 +02:00
fewizz b97d3e1d27 Closes #30 , now no fall damage only have quantum/nano wings ( Closes #29 ) 2016-10-13 16:35:57 +02:00
fewizz 28535c1d72 Whoops 2016-10-13 16:16:08 +03:00
fewizz 44114660b1 Closes #30 , now no fall damage only have quantum/nano wings ( Closes #29 ) 2016-10-13 16:14:49 +03:00
Hazeev Aidar f2e17fab72 Merge pull request #31 from GTNewHorizons/master
Added localizer for Energy Ball Focus
2016-10-13 15:13:16 +03:00
Dream-Master 21ce8e85c6 update 2016-10-12 23:34:18 +02:00
Martin Robertz 501360c92b Added localizer for Energy Ball Focus 2016-10-12 23:32:13 +02:00
fewizz 022137be62 Fix serverside. Closes #28 2016-09-24 14:29:33 +03:00
97 changed files with 561 additions and 565 deletions

No files matched your search

+2 -1
View File
@@ -41,4 +41,5 @@ ehthumbs.db
Thumbs.db
#Vim backups
*~
*~
*.bat
+7 -1
View File
@@ -19,4 +19,10 @@ Before posting to the issue tracker, make sure you meet the following criteria:
- You've gone through the effort to isolate EMT from other mods that aren't related to the issue.
- You've gone through the effort to find what conditions are necessary to reproduce the issue.
- The issue is subtle enough and has been around long enough that you think we might have missed it.
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
# Fork
This mod was forked by the GT:NH Team to continue the development of the 1.7.10 Branch.
The up-to-date Master branch can be found on our Jenkins:
http://jenkins.usrv.de
+1 -1
View File
@@ -1,5 +1,5 @@
package_group=emt
mc_version=1.7.10
forge_version=10.13.4.1614
mod_version=1.2.6
mod_version=1.2.6.7
mod_name=ElectroMagicTools
+1 -1
View File
@@ -1,3 +1,3 @@
@API(apiVersion = "1.7.10-1.0.1.5", owner = "Baubles", provides = "Baubles|API") package baubles.api;
import cpw.mods.fml.common.API;
import cpw.mods.fml.common.API;
+10 -4
View File
@@ -21,7 +21,6 @@ import emt.proxy.CommonProxy;
import emt.util.*;
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;
@@ -36,7 +35,7 @@ import org.apache.logging.log4j.Logger;
public class EMT {
public static final String NAME = "Electro-Magic Tools";
public static final String MOD_ID = "EMT";
public static final String VERSION = "1.2.6";
public static final String VERSION = "1.2.6.6";
public static final String TEXTURE_PATH = "emt";
public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory";
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
@@ -53,6 +52,11 @@ public class EMT {
public static final Logger LOGGER = LogManager.getLogger(NAME);
public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(CHANNEL);
public boolean isSimulating()
{
return !FMLCommonHandler.instance().getEffectiveSide().isClient();
}
@Instance(MOD_ID)
public static EMT instance;
@@ -61,7 +65,8 @@ public class EMT {
LOGGER.info("Starting planning the world domination");
EMTConfigHandler.init(event.getSuggestedConfigurationFile());
FMLCommonHandler.instance().bus().register(new EMTEventHandler());
FMLCommonHandler.instance().bus().register(new EMTClientEventHandler());
if(FMLCommonHandler.instance().getSide().isClient())
FMLCommonHandler.instance().bus().register(new EMTClientEventHandler());
Registry.register();
EMTEssentiasOutputs.addPrimalOutputs();
EMTEssentiasOutputs.addOutputs();
@@ -76,7 +81,8 @@ public class EMT {
proxy.load();
LOGGER.info("Making mobs drop additional items");
MinecraftForge.EVENT_BUS.register(new EMTEventHandler());
MinecraftForge.EVENT_BUS.register(new EMTClientEventHandler());
if(FMLCommonHandler.instance().getSide().isClient())
MinecraftForge.EVENT_BUS.register(new EMTClientEventHandler());
LOGGER.info("Adding dungeon loot");
EMTDungeonChestGenerator.generateLoot();
LOGGER.info("Registering entities");
@@ -7,7 +7,6 @@ import emt.EMT;
import emt.tile.TileEntityEMT;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@@ -1,17 +1,13 @@
package emt.block;
import java.util.List;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.tile.TileElectricCloud;
import net.minecraft.block.material.Material;
import net.minecraft.client.particle.EffectRenderer;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
@@ -19,10 +15,6 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.fx.particles.FXSparkle;
import thaumcraft.client.fx.particles.FXWisp;
import thaumcraft.common.Thaumcraft;
import thaumcraft.common.lib.world.ThaumcraftWorldGenerator;
import thaumcraft.common.tiles.TileNitor;
public class BlockElectricCloud extends BlockBase {
public IIcon icon;
@@ -32,6 +24,7 @@ public class BlockElectricCloud extends BlockBase {
setBlockBounds(0.3f, 0.3f, 0.3f, 0.7f, 0.7f, 0.7f);
}
@SideOnly(Side.CLIENT)
@Override
public void randomDisplayTick(World world, int x, int y, int z, Random rnd) {
FXSparkle ef = new FXSparkle(world, x + 0.5F, y + 0.5F, z + 0.5F, x + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, y + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, z + 0.5F + (rnd.nextFloat() - rnd.nextFloat()) / 3.0F, 1.0F, 6, 3);
@@ -17,8 +17,6 @@ import net.minecraft.world.World;
import java.util.List;
import java.util.Random;
import org.lwjgl.opengl.GL11;
public class BlockEssentiaGenerators extends BlockBaseContainer {
public BlockEssentiaGenerators(String name) {
@@ -5,18 +5,14 @@ import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.tile.TileEntityPortableNode;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.Explosion;
import net.minecraft.world.World;
import thaumcraft.common.blocks.BlockAiry;
import java.util.List;
import java.util.Random;
public class BlockPortableNode extends BlockAiry {
-3
View File
@@ -3,8 +3,6 @@ package emt.block;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.block.BlockBaseContainer.IconSet;
import emt.tile.TileEntityEMT;
import emt.tile.solar.air.TileEntityAirSolar;
import emt.tile.solar.air.TileEntityDoubleAirSolar;
import emt.tile.solar.air.TileEntityTripleAirSolar;
@@ -34,7 +32,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import java.util.List;
-6
View File
@@ -1,11 +1,5 @@
package emt.client;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.lwjgl.input.Keyboard;
import cpw.mods.fml.client.registry.ClientRegistry;
@@ -6,7 +6,6 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
public class ContainerIndustrialWandRecharge extends Container {
@@ -2,17 +2,11 @@ package emt.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBow;
import net.minecraft.util.MathHelper;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class ModelSpecialArmor extends ModelBiped {
@@ -1,10 +1,8 @@
package emt.client.model;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
public class ModelWings extends ModelBiped {
@@ -6,11 +6,9 @@ import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import emt.EMT;
import emt.entity.EntityLaser;
import emt.entity.EntityShield;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
@@ -14,7 +14,6 @@ import net.minecraft.entity.monster.EntitySnowman;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -1,23 +1,16 @@
package emt.entity;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.util.EMTRandomHelper.Bolt;
import emt.util.EMTRandomHelper.Point;
import io.netty.buffer.ByteBuf;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.projectile.EntityFireball;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
@@ -116,10 +109,10 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
entities.add(entity);
/** Closer - Harder */
entity.attackEntityFrom(DamageSource.magic, (float) (RADIUS - hyp));
entity.performHurtAnimation();
if(worldObj.isRemote)
if(worldObj.isRemote) {
Thaumcraft.proxy.bolt(worldObj, this, entity);
}
}
}
@@ -1,17 +1,14 @@
package emt.entity;
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
import cpw.mods.fml.common.registry.IThrowableEntity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
@@ -1,19 +1,11 @@
package emt.entity;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ic2.core.IC2;
import net.minecraft.client.Minecraft;
import net.minecraft.command.IEntitySelector;
import net.minecraft.entity.Entity;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityShield extends Entity {
+1 -5
View File
@@ -8,16 +8,12 @@ import emt.block.BlockPortableNode;
import emt.block.BlockShield;
import emt.block.BlockSolars;
import emt.item.block.ItemBlockElectricCloud;
import emt.item.block.ItemBlockEssentiaGenerator;
import emt.item.block.ItemBlockEssentiaGenerators;
import emt.item.block.ItemBlockMachines;
import emt.item.block.ItemBlockSolars;
import ic2.api.item.IC2Items;
import net.minecraft.block.Block;
import net.minecraft.block.Block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import static thaumcraft.api.ThaumcraftApi.*;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
-1
View File
@@ -9,7 +9,6 @@ import emt.entity.EntityShield;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityList.EntityEggInfo;
import net.minecraft.entity.EntityLiving;
public class EMTEntities {
+3 -5
View File
@@ -37,8 +37,6 @@ import emt.item.tool.drill.ItemThaumiumDrill;
import emt.item.tool.omnitool.ItemOmnitoolDiamond;
import emt.item.tool.omnitool.ItemOmnitoolIron;
import emt.item.tool.omnitool.ItemOmnitoolThaumium;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
@@ -113,13 +111,13 @@ public class EMTItems {
solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(EMT.MOD_ID + ".goggles.solar");
GameRegistry.registerItem(solarHelmetRevealing, "SolarHelmetRevealing");
electricBootsTraveller = new ItemElectricBootsTraveller(3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.electric");
electricBootsTraveller = new ItemElectricBootsTraveller(ItemArmor.ArmorMaterial.IRON, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.electric");
GameRegistry.registerItem(electricBootsTraveller, "ElectricBootsTraveller");
nanoBootsTraveller = new ItemNanoBootsTraveller(3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.nano");
nanoBootsTraveller = new ItemNanoBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.nano");
GameRegistry.registerItem(nanoBootsTraveller, "NanoBootsTraveller");
quantumBootsTraveller = new ItemQuantumBootsTraveller(3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.quantum");
quantumBootsTraveller = new ItemQuantumBootsTraveller(ItemArmor.ArmorMaterial.DIAMOND, 3, 3).setUnlocalizedName(EMT.MOD_ID + ".boots.traveller.quantum");
GameRegistry.registerItem(quantumBootsTraveller, "QuantumBootsTraveller");
electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName(EMT.MOD_ID + ".scribingtools.electric");
+3 -9
View File
@@ -1,6 +1,5 @@
package emt.init;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import emt.EMT;
import emt.util.EMTConfigHandler;
@@ -8,32 +7,27 @@ import emt.util.EMTCraftingAspects;
import emt.util.EMTResearchAspects;
import static emt.util.EMTRandomHelper.*;
import ic2.api.item.ElectricItem;
import ic2.api.item.IC2Items;
import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeInputItemStack;
import ic2.api.recipe.Recipes;
import ic2.core.BasicMachineRecipeManager;
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 static 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;
@@ -1,16 +1,13 @@
package emt.init;
import emt.EMT;
import emt.client.EMTKeys;
import emt.util.EMTConfigHandler;
import emt.util.EMTResearchAspects;
import emt.util.EMTResearchItem;
import ic2.api.item.IC2Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.research.ResearchCategories;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchPage;
public class EMTResearches {
-1
View File
@@ -1,6 +1,5 @@
package emt.item;
import emt.EMT;
import emt.EMT;
import emt.util.EMTTextHelper;
import net.minecraft.item.Item;
@@ -3,14 +3,12 @@ package emt.item;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
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.init.Items;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -23,7 +21,6 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.common.config.Config;
import thaumcraft.common.lib.utils.InventoryUtils;
+118 -37
View File
@@ -16,17 +16,25 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.DamageSource;
import net.minecraft.util.IIcon;
import thaumcraft.api.IWarpingGear;
import java.util.List;
import java.util.Random;
public class ItemOneRing extends ItemBase implements IBauble {
public IIcon[] icon = new IIcon[16];
public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear
{
private static final String NBT_TAG_FORGE_DATA = "EMT";
private static final String NBT_TAG_MIND_CORRUPTION = "MindCorruption";
private static final String NBT_TAG_WARP = "warp";
public IIcon[] icon = new IIcon[16];
public Random random = new Random();
public int getWarp(ItemStack itemstack, EntityPlayer player)
{
return getItemWarpLevel(itemstack, false);
}
public ItemOneRing() {
super("bauble");
this.setHasSubtypes(true);
@@ -74,65 +82,122 @@ public class ItemOneRing extends ItemBase implements IBauble {
}
}
private NBTTagCompound getOrSetForgeTag(EntityPlayer pPlayer)
{
NBTTagCompound tPlayerNBT = pPlayer.getEntityData();
NBTTagCompound forgeTag = new NBTTagCompound();
// getCompoundTag already returns the contents of "ForgeData" TagCompound. Changed this to
// save our value in EMT Sub-Tag
if (tPlayerNBT.hasKey( NBT_TAG_FORGE_DATA ))
forgeTag = tPlayerNBT.getCompoundTag( NBT_TAG_FORGE_DATA );
else
tPlayerNBT.setTag( NBT_TAG_FORGE_DATA, forgeTag );
return forgeTag;
}
private int getItemWarpLevel(ItemStack stack, boolean increment)
{
NBTTagCompound tWarpTag = new NBTTagCompound();
int tWarpLevel = 0;
if (stack.hasTagCompound())
{
if (stack.getTagCompound().hasKey( NBT_TAG_WARP ))
{
tWarpLevel = stack.getTagCompound().getInteger( NBT_TAG_WARP );
if (increment)
stack.getTagCompound().setInteger( NBT_TAG_WARP , ++tWarpLevel);
}
}
else
{
tWarpTag.setInteger( NBT_TAG_WARP, 0 );
stack.setTagCompound( tWarpTag );
}
return tWarpLevel;
}
@Override
public void onWornTick(ItemStack stack, EntityLivingBase player) {
if (!player.isInvisible()) {
player.setInvisible(true);
((EntityPlayer) player).capabilities.disableDamage = true;
}
// Stop doing this 20 times per second...
if ( random.nextInt(20) > 0)
return;
/* Why dump to a new tag when you can just grab the tag and work with it?
NBTTagCompound tag = new NBTTagCompound();
((EntityPlayer) player).writeToNBT(tag);
NBTTagCompound forgeTag = tag.getCompoundTag("ForgeData");
*/
// Retrieve Players NBT Data
NBTTagCompound forgeTag = getOrSetForgeTag((EntityPlayer)player);
int corruption = 0;
if (forgeTag.hasKey("MindCorruption"))
corruption = forgeTag.getInteger("MindCorruption");
// get corruption levels, init to 0 if not existing yet
if (forgeTag.hasKey( NBT_TAG_MIND_CORRUPTION ))
corruption = forgeTag.getInteger( NBT_TAG_MIND_CORRUPTION );
else
forgeTag.setInteger("MindCorruption", 0);
((EntityPlayer) player).capabilities.disableDamage = true;
forgeTag.setInteger( NBT_TAG_MIND_CORRUPTION, 0);
if (!player.worldObj.isRemote) {
if (corruption <= 0) {
//EMT.LOGGER.info( String.format( "Total Corruption: %d ItemWarpLevel: %d", corruption, getItemWarpLevel( stack, false ) ));
if (corruption == 0) {
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever " + EMTTextHelper.PURPLE + "tainted. " + EMTTextHelper.RED + EMTTextHelper.ITALIC + "Beware of wearing the ring. The tainting will only " + EMTTextHelper.RED + EMTTextHelper.ITALIC + "increase, and strange things will start happening."));
}
else if (corruption > 6000 && corruption < 24000 && random.nextInt(2000) == 0) {
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false));
// First effect should become active after ~5 Minutes
else if (corruption > 300 && corruption < 1400 && random.nextInt(100) == 0) {
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring somehow feels heavy"));
if (random.nextBoolean())
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false));
else
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
}
else if (corruption >= 6000 && corruption < 24000 && random.nextInt(2000) == 0) {
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
}
else if (corruption >= 24000 && corruption < 72000 && random.nextInt(2000) == 0) {
else if (corruption >= 1400 && corruption < 3800 && random.nextInt(100) == 0) {
((EntityPlayer) player).capabilities.disableDamage = false;
player.attackEntityFrom(DamageSource.magic, 5);
player.addPotionEffect(new PotionEffect(Potion.poison.id, 500, 2, false));
}
else if (corruption >= 72000 && corruption < 120000 && random.nextInt(4000) == 0) {
else if (corruption >= 3800 && corruption < 6500 && random.nextInt(100) == 0) {
((EntityPlayer) player).capabilities.disableDamage = false;
player.motionY += 2d;
}
else if (corruption >= 120000 && random.nextInt(10000) == 0) {
else if (corruption >= 6500 && random.nextInt(10000) == 0) {
((EntityPlayer) player).capabilities.disableDamage = false;
player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false));
}
player.addPotionEffect(new PotionEffect(Potion.wither.id, 5000, 4, false));
}
else if (corruption + 100 >= Integer.MAX_VALUE) { // =3333333
player.isDead = true;
}
if (corruption >= 300)
{
if ( random.nextInt( 100 ) == 0)
{
getItemWarpLevel( stack, true );
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple"));
}
}
}
forgeTag.setInteger("MindCorruption", ++corruption);
tag.setTag("ForgeData", forgeTag);
((EntityPlayer) player).readFromNBT(tag);
forgeTag.setInteger( NBT_TAG_MIND_CORRUPTION, ++corruption);
//tag.setTag( NBT_TAG_FORGE_DATA, forgeTag);
//((EntityPlayer) player).readFromNBT(tag);
}
@Override
public void onEquipped(ItemStack stack, EntityLivingBase player) {
// This purges all corruption once the ring is put on / a second ring is equipped?
/*
NBTTagCompound tag = new NBTTagCompound();
((EntityPlayer) player).writeToNBT(tag);
tag.getCompoundTag("ForgeData").setInteger("MindCorruption", 0);
tag.getCompoundTag( NBT_TAG_FORGE_DATA ).setInteger( NBT_TAG_MIND_CORRUPTION, 0);
((EntityPlayer) player).readFromNBT(tag);
*/
}
@Override
@@ -140,11 +205,13 @@ public class ItemOneRing extends ItemBase implements IBauble {
player.setInvisible(false);
if (!((EntityPlayer) player).capabilities.isCreativeMode)
((EntityPlayer) player).capabilities.disableDamage = false;
NBTTagCompound tag = new NBTTagCompound();
/* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt!
((EntityPlayer) player).writeToNBT(tag);
tag.removeTag("ForgeData");
tag.removeTag( NBT_TAG_FORGE_DATA );
((EntityPlayer) player).readFromNBT(tag);
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false));
*/
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 1, false));
}
@Override
@@ -154,8 +221,22 @@ public class ItemOneRing extends ItemBase implements IBauble {
@Override
public boolean canUnequip(ItemStack stack, EntityLivingBase player) {
NBTTagCompound tag = new NBTTagCompound();
((EntityPlayer) player).writeToNBT(tag);
return tag.getCompoundTag("ForgeData").getInteger("MindCorruption") > 600 ? true : false;
// So, how this was written, you basically could not unequip the ring for 600 ticks after you equipped it, but afterwards you could?
// Let's make it a random chance to remove it instead...
// NBTTagCompound tag = getOrSetForgeTag((EntityPlayer) player);
// return (tag.getCompoundTag( NBT_TAG_FORGE_DATA ).getInteger( NBT_TAG_MIND_CORRUPTION ) > 600);
boolean tRet = false;
if (random.nextInt( 5 ) == 0)
{
tRet = true;
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.GREEN + "You removed the Ring. Maybe you should think twice before using it next time?"));
}
else
( (EntityPlayer) player ).addChatMessage( new ChatComponentText( EMTTextHelper.PURPLE + "Nooo, don't remove me! I give you great power!" ) );
return tRet;
}
}
@@ -4,13 +4,12 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import emt.util.EMTConfigHandler;
import emt.util.EMTTextHelper;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import ic2.api.item.IMetalArmor;
import ic2.api.util.Keys;
import ic2.core.item.ElectricItemManager;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
@@ -34,15 +33,14 @@ import java.util.List;
public class ItemElectricBootsTraveller extends ItemArmor implements IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
public int maxCharge = 100000;
public int energyPerDamage = 100;
public int energyPerDamage = 1000;
public int visDiscount = 2;
public float speedBonus = 0.055F;
public float jumpBonus = 0.3F;
public double transferLimit = 100;
public boolean speedBoostActive = false;
public ItemElectricBootsTraveller(int par3, int par4) {
super(ArmorMaterial.DIAMOND, par3, par4);
public ItemElectricBootsTraveller(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
this.setMaxDamage(27);
this.setMaxStackSize(1);
this.setCreativeTab(EMT.TAB);
@@ -71,13 +69,13 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
@Override
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
if (source.isUnblockable()) {
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 3);
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0);
}
else {
double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio();
int energyPerDamage = getEnergyPerDamage();
double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage;
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit);
return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit);
}
}
@@ -97,11 +95,11 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
}
public double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
return 0.5D;
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
return 0.15D;
}
@Override
@@ -116,11 +114,6 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if (Keys.instance.isBoostKeyDown(player) && Keys.instance.isModeSwitchKeyDown(player))
{
speedBoostActive = !speedBoostActive;
}
if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
if ((player.worldObj.isRemote) && (!player.isSneaking())) {
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) {
@@ -128,7 +121,8 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
}
player.stepHeight = 1.0F;
}
if (speedBoostActive && ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)) {
if (((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)) {
player.moveFlying(0F, 1F, speedBonus);
player.jumpMovementFactor = jumpBonus;
}
@@ -146,17 +140,49 @@ public class ItemElectricBootsTraveller extends ItemArmor implements IElectricIt
}
}
// make the boots worth upgrading
public float getMaxHealthyDropDist()
{
return 20.0F;
}
public float getMinimumDropDist()
{
return 4.0f;
}
@SubscribeEvent
public void onLivingFall(LivingFallEvent event) {
if (event.entity instanceof EntityPlayer) {
EntityPlayer entity = (EntityPlayer) event.entity;
if ((entity.inventory.armorInventory[0] != null) && (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) {
ItemStack stack = entity.inventory.armorInventory[0];
if (ElectricItem.manager.use(stack, energyPerDamage, entity))
event.setCanceled(true);
}
}
}
public void onLivingFall(LivingFallEvent event)
{
if( ( EMT.instance.isSimulating() ) && ( ( event.entity instanceof EntityLivingBase ) ) )
{
if( event.entity instanceof EntityPlayer )
{
EntityPlayer entity = (EntityPlayer) event.entity;
if( ( entity.inventory.armorInventory[0] != null ) && ( entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller ) )
{
ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller)entity.inventory.armorInventory[0].getItem();
ItemStack stack = entity.inventory.armorInventory[0];
// Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty
if ( tUsedBoots.getMinimumDropDist() > event.distance )
{
event.setCanceled( true );
}
else
{
float tEnergyDemand = tUsedBoots.energyPerDamage * (( ( event.distance > tUsedBoots.getMaxHealthyDropDist() ) ? event.distance * 3 : event.distance ) - 4.0F);
if( tEnergyDemand <= ElectricItem.manager.getCharge( stack ) )
{
//EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance, tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() ));
ElectricItem.manager.discharge( stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false );
event.setCanceled( true );
}
}
}
}
}
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
@@ -10,14 +10,36 @@ import net.minecraft.item.ItemStack;
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
public ItemNanoBootsTraveller(int par3, int par4) {
super(par3, par4);
public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
maxCharge = 1000000;
speedBonus = (float) EMTConfigHandler.nanoBootsSpeed;
jumpBonus = (float) EMTConfigHandler.nanoBootsJump;
visDiscount = 4;
transferLimit = 1000;
energyPerDamage = 500;
transferLimit = 1600;
energyPerDamage = 5000;
}
@Override
public float getMaxHealthyDropDist()
{
return (float) EMTConfigHandler.nanoBootsMaxDrop;
}
@Override
public float getMinimumDropDist()
{
return (float) EMTConfigHandler.nanoBootsMinDrop;
}
@Override
public double getDamageAbsorptionRatio() {
return 0.9D;
}
@Override
public int getTier(ItemStack itemStack) {
return 3;
}
@SideOnly(Side.CLIENT)
@@ -10,14 +10,36 @@ import net.minecraft.item.ItemStack;
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
public ItemQuantumBootsTraveller(int par3, int par4) {
super(par3, par4);
public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
maxCharge = 10000000;
speedBonus = (float) EMTConfigHandler.quantumBootsSpeed;
jumpBonus = (float) EMTConfigHandler.quantumBootsJump;
visDiscount = 5;
transferLimit = 10000;
energyPerDamage = 1000;
transferLimit = 12000;
energyPerDamage = 20000;
}
@Override
public float getMaxHealthyDropDist()
{
return (float) EMTConfigHandler.quantumBootsMaxDrop;
}
@Override
public float getMinimumDropDist()
{
return (float) EMTConfigHandler.quantumBootsMinDrop;
}
@Override
public double getDamageAbsorptionRatio() {
return 1D;
}
@Override
public int getTier(ItemStack itemStack) {
return 4;
}
@SideOnly(Side.CLIENT)
@@ -1,68 +1,39 @@
package emt.item.armor.chestplate;
import cpw.mods.fml.common.eventhandler.EventBus;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import emt.client.model.ModelSpecialArmor;
import emt.client.model.ModelWings;
import emt.init.EMTItems;
import emt.item.armor.wings.ItemNanoWing;
import emt.item.armor.wings.ItemQuantumWing;
import emt.util.EMTConfigHandler;
import emt.util.EMTRandomHelper;
import emt.util.EMTTextHelper;
import ic2.api.item.ElectricItem;
import ic2.api.item.IC2Items;
import ic2.api.item.IElectricItemManager;
import ic2.core.IC2;
import ic2.core.IC2Achievements;
import ic2.core.IC2Potion;
import ic2.core.Ic2Items;
import ic2.core.Platform;
import ic2.core.audio.AudioManager;
import ic2.core.audio.AudioSource;
import ic2.core.audio.PositionSpec;
import ic2.core.init.InternalName;
import ic2.core.init.MainConfig;
import ic2.core.item.ItemTinCan;
import ic2.core.item.armor.ItemArmorElectric;
import ic2.core.util.ConfigUtil;
import ic2.core.util.Keyboard;
import ic2.core.util.StackUtil;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.FoodStats;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.ISpecialArmor;
import net.minecraftforge.common.ISpecialArmor.ArmorProperties;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingFallEvent;
@@ -85,7 +56,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric {
private static boolean lastJetpackUsed = false;
public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) {
super(internalName, InternalName.quantum, armorType, 2000000, 12000.0D, 4);
super(internalName, InternalName.quantum, armorType, 20000000D, 18000.0D, 4);
MinecraftForge.EVENT_BUS.register(this);
this.setCreativeTab(EMT.TAB);
}
@@ -404,6 +375,11 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric {
}
}
@Override
public int getTier(ItemStack itemStack) {
return 4;
}
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
@@ -3,7 +3,6 @@ package emt.item.armor.goggles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import emt.util.EMTConfigHandler;
import emt.util.EMTTextHelper;
import ic2.api.item.ElectricItem;
@@ -29,10 +28,10 @@ import java.util.List;
public class ItemElectricGoggles extends ItemArmor implements IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor {
public double maxCharge = 10000;
public double transferLimit = 10;
public double maxCharge = 100000;
public double transferLimit = 100;
public int tier = 2;
public int energyPerDamage = 100;
public int energyPerDamage = 1000;
public int visDiscount = 5;
public ItemElectricGoggles(ArmorMaterial material, int par3, int par4) {
@@ -148,7 +147,7 @@ public class ItemElectricGoggles extends ItemArmor implements IElectricItem, IVi
}
public double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
return 0.5D;
}
public int getEnergyPerDamage() {
@@ -156,7 +155,7 @@ public class ItemElectricGoggles extends ItemArmor implements IElectricItem, IVi
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
return 0.15D;
}
/* IC2 API METHODS */
@@ -3,16 +3,11 @@ package emt.item.armor.goggles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import emt.util.EMTConfigHandler;
import ic2.api.item.ElectricItem;
import ic2.api.item.IC2Items;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class ItemNanoGoggles extends ItemElectricGoggles {
@@ -24,9 +19,9 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
this.setMaxStackSize(1);
visDiscount = 6;
tier = 3;
maxCharge = 100000;
energyPerDamage = 1000;
transferLimit = 100;
maxCharge = 1000000;
energyPerDamage = 5000;
transferLimit = 1600;
}
@SideOnly(Side.CLIENT)
@@ -40,23 +35,18 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
return EMT.TEXTURE_PATH + ":textures/models/thaumicnanohelmet.png";
}
@Override
public double getDamageAbsorptionRatio() {
return 0.9D;
}
@Override
public int getTier(ItemStack itemStack) {
return 3;
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if (EMTConfigHandler.nightVisionOff == false) {
if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) {
int x = MathHelper.floor_double(player.posX);
int z = MathHelper.floor_double(player.posZ);
int y = MathHelper.floor_double(player.posY);
int lightlevel = player.worldObj.getBlockLightValue(x, y, z);
if (lightlevel >= 0)
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3));
ElectricItem.manager.use(itemStack, 1 / 1000, player);
}
else {
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true));
}
}
IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack);
}
}
@@ -3,23 +3,21 @@ package emt.item.armor.goggles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import emt.util.EMTConfigHandler;
import ic2.api.item.ElectricItem;
import ic2.api.item.IC2Items;
import ic2.core.IC2;
import ic2.core.util.Keyboard;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;
public class ItemQuantumGoggles extends ItemNanoGoggles {
@@ -31,10 +29,10 @@ public class ItemQuantumGoggles extends ItemNanoGoggles {
this.setMaxDamage(27);
this.setMaxStackSize(1);
maxCharge = 10000000;
tier = 3;
tier = 4;
visDiscount = 8;
transferLimit = 10000;
energyPerDamage = 1000;
transferLimit = 12000;
energyPerDamage = 20000;
potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000));
potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000));
@@ -53,47 +51,49 @@ public class ItemQuantumGoggles extends ItemNanoGoggles {
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
int refill = player.getAir();
if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) {
player.setAir(refill + 200);
ElectricItem.manager.use(itemStack, 1000, null);
}
public double getDamageAbsorptionRatio() {
return 1D;
}
Iterator i$ = (new LinkedList(player.getActivePotionEffects())).iterator();
do {
if (!i$.hasNext()) {
break;
}
{
PotionEffect effect = (PotionEffect) i$.next();
int id = effect.getPotionID();
Integer cost = (Integer) potionCost.get(Integer.valueOf(id));
if (cost != null) {
cost = Integer.valueOf(cost.intValue() * (effect.getAmplifier() + 1));
if (ElectricItem.manager.canUse(itemStack, cost.intValue())) {
ElectricItem.manager.use(itemStack, cost.intValue(), null);
ItemStack milk = (new ItemStack(Items.milk_bucket));
player.curePotionEffects(milk);
@Override
public int getTier(ItemStack itemStack) {
return 4;
}
// MUAHAHAHA
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
try {
Field f;
f = Keyboard.class.getDeclaredField("playerKeys");
f.setAccessible(true);
Map<EntityPlayer, Set<Enum>> playerKeys = (Map<EntityPlayer, Set<Enum>>) f.get(IC2.keyboard);
Enum hub = null;
Set<Enum> set = playerKeys.get(player);
if (set != null) {
for (Enum e : set) {
if (e.ordinal() == 6) {
hub = e;
}
}
set.remove(hub);
}
}
while (true);
if (EMTConfigHandler.nightVisionOff == false) {
if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) {
int x = MathHelper.floor_double(player.posX);
int z = MathHelper.floor_double(player.posZ);
int y = MathHelper.floor_double(player.posY);
int lightlevel = player.worldObj.getBlockLightValue(x, y, z);
if (lightlevel >= 0)
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3));
ElectricItem.manager.use(itemStack, 1 / 1000, player);
}
else {
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true));
IC2Items.getItem("quantumHelmet").getItem().onArmorTick(world, player, itemStack);
if (hub != null) {
set.add(hub);
}
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (SecurityException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
@@ -3,35 +3,28 @@ package emt.item.armor.goggles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import emt.util.EMTConfigHandler;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
private int ticker;
/*private int ticker;
private int generating;
private int genDay;
private int genNight;
private boolean sunIsUp;
private boolean skyIsVisible;
private boolean noSunWorld;
private boolean dampPlace;
private boolean dampPlace;*/
private int genDay;
private int genNight;
private static final Map potionCost = new HashMap();
@@ -41,14 +34,14 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
this.setMaxDamage(27);
this.setMaxStackSize(1);
this.setCreativeTab(EMT.TAB);
this.maxCharge = 1000000;
this.genDay = 256;
this.genNight = 128;
maxCharge = 10000000;
// this.maxCharge = 20000000; //REALLY?
this.genDay = 65536;
this.genNight = 4096;
maxCharge = 20000000;
visDiscount = 7;
tier = 3;
transferLimit = 10000;
energyPerDamage = 10000;
tier = 4;
transferLimit = 18000;
energyPerDamage = 20000;
potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000));
potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000));
@@ -66,120 +59,47 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
return EMT.TEXTURE_PATH + ":textures/models/solarrevealinghelmet.png";
}
@SuppressWarnings("unchecked")
@Override
public double getDamageAbsorptionRatio() {
return 1D;
}
@Override
public int getTier(ItemStack itemStack) {
return 4;
}
@Override
public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) {
if (EMTConfigHandler.nightVisionOff == false) {
if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) {
int x = MathHelper.floor_double(player.posX);
int z = MathHelper.floor_double(player.posZ);
int y = MathHelper.floor_double(player.posY);
int lightlevel = player.worldObj.getBlockLightValue(x, y, z);
if (lightlevel >= 0)
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3));
ElectricItem.manager.use(itemStack, 1 / 1000, player);
}
else {
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true));
}
}
int refill = player.getAir();
if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) {
player.setAir(refill + 200);
ElectricItem.manager.use(itemStack, 1000, null);
}
@SuppressWarnings("rawtypes")
Iterator i$ = (new LinkedList(player.getActivePotionEffects())).iterator();
do {
if (!i$.hasNext()) {
break;
}
{
PotionEffect effect = (PotionEffect) i$.next();
int id = effect.getPotionID();
Integer cost = (Integer) potionCost.get(Integer.valueOf(id));
if (cost != null) {
cost = Integer.valueOf(cost.intValue() * (effect.getAmplifier() + 1));
if (ElectricItem.manager.canUse(itemStack, cost.intValue())) {
ElectricItem.manager.use(itemStack, cost.intValue(), null);
ItemStack milk = (new ItemStack(Items.milk_bucket));
player.curePotionEffects(milk);
}
}
}
}
while (true);
super.onArmorTick(worldObj, player, itemStack);
if (worldObj.isRemote) {
return;
}
checkForSun(player);
if (this.generating > 0) {
int energyLeft = this.generating;
if(worldObj.canBlockSeeTheSky((int)player.posX, (int)player.posY + 1, (int)player.posZ) && !worldObj.isRaining()) {
double enerj = (worldObj.isDaytime() ? (double)genDay : (double) genNight) / 12000D;
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
if (energyLeft > 0) {
if (enerj > 0) {
if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false);
energyLeft -= sentPacket;
double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], enerj ,4, false, false);
enerj -= sentPacket;
}
}
else {
} else {
return;
}
}
for (int j = 0; j < player.inventory.mainInventory.length; j++) {
if (energyLeft > 0) {
if (enerj > 0) {
if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) {
double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false);
energyLeft -= sentPacket;
double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], enerj, 4, false, false);
enerj -= sentPacket;
}
}
else {
} else {
return;
}
}
}
}
public int checkForSun(EntityPlayer player) {
if (this.ticker++ % tickRate() == 0) {
updateVisibility(player);
}
if ((this.sunIsUp) && (this.skyIsVisible)) {
this.generating = (0 + this.genDay);
return this.generating;
}
if (this.skyIsVisible) {
this.generating = (0 + this.genNight);
return this.generating;
}
this.generating = 0;
return this.generating;
}
public void updateVisibility(EntityPlayer player) {
this.dampPlace = (player.worldObj.getWorldChunkManager().getBiomeGenAt((int) player.posX, (int) player.posZ).getIntRainfall() > 0);
this.noSunWorld = player.worldObj.provider.hasNoSky;
Boolean rainWeather = Boolean.valueOf((this.dampPlace) && ((player.worldObj.isRaining()) || (player.worldObj.isThundering())));
if ((!player.worldObj.isDaytime()) || (rainWeather.booleanValue())) {
this.sunIsUp = false;
}
else {
this.sunIsUp = true;
}
if ((!player.worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY + 1, (int) player.posZ)) || (this.noSunWorld)) {
this.skyIsVisible = false;
}
else {
this.skyIsVisible = true;
}
}
public static int tickRate() {
return 128;
}
}
@@ -1,17 +1,13 @@
package emt.item.armor.wings;
import java.util.Random;
import ic2.api.item.ElectricItem;
import ic2.core.IC2;
import ic2.core.util.StackUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import emt.client.model.ModelWings;
import emt.util.EMTConfigHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
@@ -23,9 +19,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class ItemFeatherWing extends ItemArmor {
public int visDiscount = 0;
Random rnd;
public ItemFeatherWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
@@ -33,9 +27,12 @@ public class ItemFeatherWing extends ItemArmor {
this.setMaxDamage(120);
this.setCreativeTab(EMT.TAB);
this.isDamageable();
rnd = new Random();
}
public float getFallDamageMult() {
return 0.75F;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister iconRegister) {
@@ -65,11 +62,12 @@ public class ItemFeatherWing extends ItemArmor {
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
useWings(player, stack, world, 0.09f, 0.9f, 0.9f, 0);
useWings(player, stack, world, 0.11f, 0.9f, 0.9f, 0);
}
public void useWings(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount) {
NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
boolean isJmuping = nbtData.getBoolean("isJumping");
boolean isHolding = nbtData.getBoolean("isHolding");
@@ -93,7 +91,7 @@ public class ItemFeatherWing extends ItemArmor {
}
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1);
for (int i = 0; i < 4; i++) {
world.spawnParticle("cloud", player.posX - 1 + (rnd.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (rnd.nextInt(100) / 50d), 0, -0.5, 0);
world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0);
}
nbtData.setByte("f", (byte) 0);
}
@@ -115,9 +113,5 @@ public class ItemFeatherWing extends ItemArmor {
if (player.isSneaking() && !player.onGround && player.motionY < 0) {
player.motionY *= 0.6;
}
if (player.fallDistance > 0.0F) {
player.fallDistance = 0;
}
}
}
@@ -3,13 +3,11 @@ package emt.item.armor.wings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import emt.item.armor.wings.ItemThaumiumReinforcedWing;
import emt.util.EMTConfigHandler;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import ic2.api.item.IMetalArmor;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
@@ -25,10 +23,10 @@ import java.util.List;
public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectricItem, ISpecialArmor, IMetalArmor {
public static int maxCharge = 100000;
public static int maxCharge = 1000000;
public int tier = 3;
public double transferLimit = 1000;
public int energyPerDamage = 100;
public double transferLimit = 1600;
public int energyPerDamage = 5000;
public ItemNanoWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
@@ -37,6 +35,11 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
this.setCreativeTab(EMT.TAB);
visDiscount = 5;
}
@Override
public float getFallDamageMult() {
return 0.2F;
}
@SideOnly(Side.CLIENT)
@Override
@@ -131,11 +134,11 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
}
public double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
return 0.9D;
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
return 0.25D;
}
/* IC2 API METHODS */
@@ -152,7 +155,7 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
@Override
public int getTier(ItemStack itemStack) {
return 2;
return 3;
}
@Override
@@ -3,8 +3,6 @@ package emt.item.armor.wings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.util.EMTConfigHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
@@ -12,7 +10,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemQuantumWing extends ItemNanoWing {
public static int maxCharge = 1000000;
public static int maxCharge = 10000000;
public int tier = 4;
public ItemQuantumWing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4);
@@ -20,8 +19,13 @@ public class ItemQuantumWing extends ItemNanoWing {
this.setMaxDamage(27);
this.setCreativeTab(EMT.TAB);
visDiscount = 6;
transferLimit = 10000;
energyPerDamage = 1000;
transferLimit = 12000;
energyPerDamage = 20000;
}
@Override
public float getFallDamageMult() {
return 0.0F;
}
@SideOnly(Side.CLIENT)
@@ -45,4 +49,13 @@ public class ItemQuantumWing extends ItemNanoWing {
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public int getTier(ItemStack itemStack) {
return 4;
}
public double getDamageAbsorptionRatio() {
return 1D;
}
}
@@ -3,21 +3,15 @@ package emt.item.armor.wings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.EMT;
import emt.util.EMTConfigHandler;
import emt.util.EMTTextHelper;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister;
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 thaumcraft.api.IRepairable;
import thaumcraft.api.IVisDiscountGear;
import thaumcraft.api.aspects.Aspect;
import ic2.core.IC2;
import ic2.core.util.StackUtil;
import java.util.List;
@@ -31,6 +25,11 @@ public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisD
this.isDamageable();
visDiscount = 4;
}
@Override
public float getFallDamageMult() {
return 0.5F;
}
@Override
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
@@ -4,7 +4,6 @@ import emt.EMT;
import emt.util.EMTTextHelper;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -1,11 +1,7 @@
package emt.item.block;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import java.util.List;
public class ItemBlockEssentiaGenerator extends ItemBlock {
@@ -1,19 +1,9 @@
package emt.item.block;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import java.util.List;
import emt.tile.generator.TileEntityAerGenerator;
import emt.tile.generator.TileEntityArborGenerator;
import emt.tile.generator.TileEntityAuramGenerator;
import emt.tile.generator.TileEntityIgnisGenerator;
import emt.tile.generator.TileEntityPotentiaGenerator;
import emt.util.EMTConfigHandler;
public class ItemBlockEssentiaGenerators extends ItemBlock {
public ItemBlockEssentiaGenerators(Block id) {
@@ -10,7 +10,6 @@ import static emt.util.EMTTextHelper.localize;
import java.util.List;
import emt.block.BlockBaseContainer;
import emt.block.BlockSolars;
import emt.util.EMTConfigHandler;
import emt.util.EMTTextHelper;
@@ -3,7 +3,6 @@ package emt.item.focus;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
@@ -11,7 +10,6 @@ import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.wands.IWandFocus;
import thaumcraft.api.wands.ItemFocusBasic;
import java.util.List;
@@ -1,18 +1,12 @@
package emt.item.focus;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.monster.EntitySnowman;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.wands.ItemFocusBasic;
import thaumcraft.common.items.wands.ItemWandCasting;
public class ItemChristmasFocus extends ItemBaseFocus {
@@ -2,18 +2,11 @@ package emt.item.focus;
import emt.entity.EntityEnergyBall;
import ic2.api.item.ElectricItem;
import ic2.core.item.armor.ItemArmorElectric;
import ic2.core.item.armor.ItemArmorIC2;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityLargeFireball;
import net.minecraft.entity.projectile.EntitySmallFireball;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.wands.ItemFocusBasic;
public class ItemEnergyBallFocus extends ItemBaseFocus {
@@ -3,8 +3,6 @@ package emt.item.focus;
import emt.entity.EntityLaser;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
@@ -1,22 +1,12 @@
package emt.item.focus;
import java.util.ArrayList;
import java.util.LinkedList;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import emt.EMT;
import emt.entity.EntityShield;
import emt.init.EMTBlocks;
import ic2.core.IC2;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
@@ -8,7 +8,6 @@ import ic2.api.item.IElectricItem;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemHoe;
@@ -18,7 +17,6 @@ import net.minecraft.world.World;
import thaumcraft.common.Thaumcraft;
import thaumcraft.common.blocks.BlockCustomPlant;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.items.equipment.ItemElementalHoe;
import thaumcraft.common.lib.utils.Utils;
import java.util.List;
@@ -26,7 +24,7 @@ import java.util.List;
public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
public IIcon icon;
public int maxCharge = 20000;
public int maxCharge = 200000;
public int growthCost = 500;
public int tillCost = 100;
@@ -126,7 +124,7 @@ public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
@Override
public int getTier(ItemStack itemStack) {
return 1;
return 2;
}
@Override
@@ -25,7 +25,7 @@ import java.util.List;
public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
public int maxCharge = 1000000;
public int maxCharge = 2000000;
private final int hitCost = 5000;
private final int lightningCost = 75000;
@@ -180,7 +180,7 @@ public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
@Override
public int getTier(ItemStack itemStack) {
return 2;
return 4;
}
@Override
@@ -7,12 +7,9 @@ import emt.util.EMTConfigHandler;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import ic2.core.IC2;
import ic2.core.audio.AudioSource;
import ic2.core.audio.PositionSpec;
import ic2.core.util.StackUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockTorch;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.enchantment.Enchantment;
@@ -35,12 +32,11 @@ import net.minecraftforge.event.ForgeEventFactory;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Random;
public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
public int maxCharge = 40000;
public int maxCharge = 50000;
public int cost = 200;
public int hitCost = 300;
public int tier = 2;
@@ -5,13 +5,8 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import ic2.api.item.ElectricItem;
import ic2.core.IC2;
import ic2.core.audio.AudioSource;
import ic2.core.audio.PositionSpec;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
@@ -37,7 +32,7 @@ public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
setCreativeTab(EMT.TAB);
this.maxStackSize = 1;
this.setMaxDamage(27);
maxCharge = 900000;
maxCharge = 1000000;
cost = 400;
hitCost = 500;
tier = 3;
@@ -4,12 +4,8 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import ic2.api.item.ElectricItem;
import ic2.core.IC2;
import ic2.core.audio.AudioSource;
import ic2.core.audio.PositionSpec;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -23,7 +19,7 @@ public class ItemThaumiumChainsaw extends ItemDiamondChainsaw {
this.setCreativeTab(EMT.TAB);
this.setMaxDamage(27);
this.setMaxStackSize(1);
maxCharge = 60000;
maxCharge = 100000;
cost = 250;
hitCost = 350;
}
@@ -52,8 +52,8 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
else {
this.setMaxDamage(2571);
}
maxCharge = 900000;
transferLimit = 900;
maxCharge = 1000000;
transferLimit = 1000;
tier = 3;
}
@@ -4,14 +4,12 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.util.EMTConfigHandler;
import emt.util.EMTRandomHelper;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
@@ -22,7 +20,7 @@ import java.util.List;
public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
public int maxCharge = 60000;
public int maxCharge = 100000;
public int cost;
public int tier = 2;
public double transferLimit = 100;
@@ -26,7 +26,7 @@ public class ItemOmnitoolDiamond extends ItemOmnitoolIron {
else {
this.setMaxDamage(350);
}
maxCharge = 70000;
maxCharge = 100000;
hitCost = 250;
}
@@ -25,7 +25,7 @@ import java.util.Locale;
public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
public int maxCharge = 20000;
public int maxCharge = 50000;
public int cost;
public int hitCost = 125;
@@ -26,7 +26,7 @@ public class ItemOmnitoolThaumium extends ItemOmnitoolDiamond {
else {
this.setMaxDamage(467);
}
maxCharge = 140000;
maxCharge = 200000;
hitCost = 650;
}
@@ -1,11 +1,9 @@
package emt.network;
import io.netty.buffer.ByteBuf;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import emt.init.EMTItems;
public class PacketEMTKeys implements IMessage, IMessageHandler<PacketEMTKeys, IMessage> {
-6
View File
@@ -1,15 +1,9 @@
package emt.proxy;
import org.lwjgl.input.Keyboard;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderFireball;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RenderSnowMan;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import emt.client.EMTKeys;
import emt.client.renderer.RenderLaser;
+26 -18
View File
@@ -1,5 +1,9 @@
package emt.tile;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.tileentity.TileEntity;
import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.fx.particles.FXWisp;
@@ -14,28 +18,32 @@ public class TileElectricCloud extends TileEntity {
@Override
public void updateEntity() {
if (worldObj.isRemote) {
if (worldObj.rand.nextInt(4) == 0) {
Thaumcraft.proxy.wispFX3(worldObj, xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, xCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, yCoord + 0.5F, zCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, 0.25F, 1, true, -0.02F);
}
if(worldObj.isRemote && FMLCommonHandler.instance().getSide().isClient() && FMLClientHandler.instance().getClient().renderViewEntity != null)
fx();
}
@SideOnly(Side.CLIENT)
public void fx() {
if (worldObj.rand.nextInt(4) == 0) {
Thaumcraft.proxy.wispFX3(worldObj, xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, xCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, yCoord + 0.5F, zCoord + 0.4F + worldObj.rand.nextFloat() * 0.2F, 0.25F, 1, true, -0.02F);
}
if (worldObj.rand.nextInt(12) == 0) {
if (worldObj.rand.nextInt(12) == 0) {
Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
if (worldObj.rand.nextInt(2) == 0) {
Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
if (worldObj.rand.nextInt(2) == 0) {
Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
}
if (worldObj.rand.nextInt(4) == 0) {
Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
}
}
if (worldObj.rand.nextInt(4) == 0) {
Thaumcraft.proxy.nodeBolt(worldObj, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, xCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, yCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f, zCoord + (worldObj.rand.nextInt(40) / 20f) - 0.5f);
}
}
if (worldObj.rand.nextInt(3) == 0) {
FXWisp wisp = new FXWisp(worldObj, xCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), yCoord + 0.5, zCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), 0.4f + worldObj.rand.nextInt(40) / 100f, 1);
wisp.setGravity(-0.02F);
wisp.setRBGColorF(worldObj.rand.nextInt(40) / 100f, 0, 1);
wisp.setAlphaF(1);
ParticleEngine.instance.addEffect(worldObj, wisp);
}
if (worldObj.rand.nextInt(3) == 0) {
FXWisp wisp = new FXWisp(worldObj, xCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), yCoord + 0.5, zCoord + 0.5 + ((worldObj.rand.nextInt(40) / 160f) - 0.125f), 0.4f + worldObj.rand.nextInt(40) / 100f, 1);
wisp.setGravity(-0.02F);
wisp.setRBGColorF(worldObj.rand.nextInt(20) / 100f, worldObj.rand.nextInt(20) / 100f, 1);
wisp.setAlphaF(1);
ParticleEngine.instance.addEffect(worldObj, wisp);
}
}
}
@@ -1,6 +1,5 @@
package emt.tile.generator;
import emt.util.EMTConfigHandler;
import emt.util.EMTEssentiasOutputs;
import thaumcraft.api.aspects.Aspect;
@@ -1,6 +1,5 @@
package emt.tile.generator;
import emt.util.EMTConfigHandler;
import emt.util.EMTEssentiasOutputs;
import thaumcraft.api.aspects.Aspect;
@@ -1,6 +1,5 @@
package emt.tile.generator;
import emt.util.EMTConfigHandler;
import emt.util.EMTEssentiasOutputs;
import thaumcraft.api.aspects.Aspect;
@@ -3,15 +3,11 @@ package emt.tile.generator;
import java.util.Random;
import emt.tile.TileEntityEMT;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.client.particle.EntitySmokeFX;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.IAspectSource;
import thaumcraft.common.lib.events.EssentiaHandler;
import thaumcraft.common.lib.network.PacketHandler;
import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource;
@@ -1,6 +1,5 @@
package emt.tile.generator;
import emt.util.EMTConfigHandler;
import emt.util.EMTEssentiasOutputs;
import thaumcraft.api.aspects.Aspect;
@@ -1,8 +1,6 @@
package emt.tile.generator;
import emt.util.EMTConfigHandler;
import emt.util.EMTEssentiasOutputs;
import ic2.api.energy.prefab.BasicSource;
import thaumcraft.api.aspects.Aspect;
public class TileEntityPotentiaGenerator extends TileEntityBaseGenerator {
@@ -11,7 +11,7 @@ import emt.tile.TileEntityEMT;
public abstract class TileEntitySolarBase extends TileEntityEMT implements IWrenchable {
public BasicSource energySource = new BasicSource(this, 10000, 4);
public BasicSource energySource;
public static Random random = new Random();
public boolean initialized;
public boolean theSunIsVisible;
@@ -10,6 +10,8 @@ import net.minecraft.item.ItemStack;
public class TileEntityAirSolar extends TileEntitySolarBase {
public TileEntityAirSolar() {
super();
energySource = new BasicSource(this, 10000, 3);
output = EMTConfigHandler.compressedSolarOutput;
}
@@ -9,6 +9,8 @@ import net.minecraft.item.ItemStack;
public class TileEntityDoubleAirSolar extends TileEntityAirSolar {
public TileEntityDoubleAirSolar() {
super();
energySource = new BasicSource(this, 10000, 4);
output = EMTConfigHandler.doubleCompressedSolarOutput;
}
@@ -9,7 +9,9 @@ import net.minecraft.item.ItemStack;
public class TileEntityTripleAirSolar extends TileEntityAirSolar {
public TileEntityTripleAirSolar() {
super();
output = EMTConfigHandler.tripleCompressedSolarOutput;
energySource = new BasicSource(this, 40000, 5);
}
@Override
@@ -3,12 +3,15 @@ package emt.tile.solar.compressed;
import emt.init.EMTBlocks;
import emt.tile.solar.TileEntitySolarBase;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityCompressedSolar extends TileEntitySolarBase {
public TileEntityCompressedSolar() {
super();
energySource = new BasicSource(this, 10000, 3);
output = EMTConfigHandler.compressedSolarOutput;
}
@@ -3,12 +3,15 @@ package emt.tile.solar.compressed;
import emt.init.EMTBlocks;
import emt.tile.solar.TileEntitySolarBase;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityDoubleCompressedSolar extends TileEntitySolarBase {
public TileEntityDoubleCompressedSolar() {
super();
energySource = new BasicSource(this, 10000, 4);
output = EMTConfigHandler.doubleCompressedSolarOutput;
}
@@ -3,13 +3,16 @@ package emt.tile.solar.compressed;
import emt.init.EMTBlocks;
import emt.tile.solar.TileEntitySolarBase;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityTripleCompressedSolar extends TileEntitySolarBase {
public TileEntityTripleCompressedSolar() {
super();
output = EMTConfigHandler.tripleCompressedSolarOutput;
energySource = new BasicSource(this, 40000, 5);
}
@Override
@@ -3,12 +3,15 @@ package emt.tile.solar.dark;
import emt.init.EMTBlocks;
import emt.tile.solar.TileEntitySolarBase;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityDarkSolar extends TileEntitySolarBase {
public TileEntityDarkSolar() {
super();
energySource = new BasicSource(this, 10000, 3);
output = EMTConfigHandler.compressedSolarOutput;
}
@@ -2,12 +2,15 @@ package emt.tile.solar.dark;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityDoubleDarkSolar extends TileEntityDarkSolar {
public TileEntityDoubleDarkSolar() {
super();
energySource = new BasicSource(this, 10000, 4);
output = EMTConfigHandler.doubleCompressedSolarOutput;
}
@@ -2,13 +2,16 @@ package emt.tile.solar.dark;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityTripleDarkSolar extends TileEntityDarkSolar {
public TileEntityTripleDarkSolar() {
super();
output = EMTConfigHandler.tripleCompressedSolarOutput;
energySource = new BasicSource(this, 40000, 5);
}
@Override
@@ -2,12 +2,15 @@ package emt.tile.solar.earth;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityDoubleEarthSolar extends TileEntityEarthSolar {
public TileEntityDoubleEarthSolar() {
super();
energySource = new BasicSource(this, 10000, 4);
output = EMTConfigHandler.doubleCompressedSolarOutput;
}
@@ -3,12 +3,15 @@ package emt.tile.solar.earth;
import emt.init.EMTBlocks;
import emt.tile.solar.TileEntitySolarBase;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityEarthSolar extends TileEntitySolarBase {
public TileEntityEarthSolar() {
super();
energySource = new BasicSource(this, 10000, 3);
output = EMTConfigHandler.compressedSolarOutput;
}
@@ -2,13 +2,16 @@ package emt.tile.solar.earth;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityTripleEarthSolar extends TileEntityEarthSolar {
public TileEntityTripleEarthSolar() {
super();
output = EMTConfigHandler.tripleCompressedSolarOutput;
energySource = new BasicSource(this, 40000, 5);
}
@Override
@@ -2,12 +2,15 @@ package emt.tile.solar.fire;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityDoubleFireSolar extends TileEntityFireSolar {
public TileEntityDoubleFireSolar() {
super();
energySource = new BasicSource(this, 10000, 4);
output = EMTConfigHandler.doubleCompressedSolarOutput;
}
@@ -3,12 +3,15 @@ package emt.tile.solar.fire;
import emt.init.EMTBlocks;
import emt.tile.solar.TileEntitySolarBase;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityFireSolar extends TileEntitySolarBase {
public TileEntityFireSolar() {
super();
energySource = new BasicSource(this, 10000, 3);
output = EMTConfigHandler.compressedSolarOutput;
}
@@ -2,13 +2,16 @@ package emt.tile.solar.fire;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityTripleFireSolar extends TileEntityFireSolar {
public TileEntityTripleFireSolar() {
super();
output = EMTConfigHandler.tripleCompressedSolarOutput;
energySource = new BasicSource(this, 40000, 5);
}
@Override
@@ -2,12 +2,15 @@ package emt.tile.solar.order;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityDoubleOrderSolar extends TileEntityOrderSolar {
public TileEntityDoubleOrderSolar() {
super();
energySource = new BasicSource(this, 10000, 4);
output = EMTConfigHandler.doubleCompressedSolarOutput;
}
@@ -3,12 +3,15 @@ package emt.tile.solar.order;
import emt.init.EMTBlocks;
import emt.tile.solar.TileEntitySolarBase;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityOrderSolar extends TileEntitySolarBase {
public TileEntityOrderSolar() {
super();
energySource = new BasicSource(this, 10000, 3);
output = EMTConfigHandler.compressedSolarOutput;
}
@@ -2,13 +2,16 @@ package emt.tile.solar.order;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityTripleOrderSolar extends TileEntityOrderSolar {
public TileEntityTripleOrderSolar() {
super();
output = EMTConfigHandler.tripleCompressedSolarOutput;
energySource = new BasicSource(this, 40000, 5);
}
@Override
@@ -2,12 +2,15 @@ package emt.tile.solar.water;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityDoubleWaterSolar extends TileEntityWaterSolar {
public TileEntityDoubleWaterSolar() {
super();
energySource = new BasicSource(this, 10000, 4);
output = EMTConfigHandler.doubleCompressedSolarOutput;
}
@@ -2,13 +2,16 @@ package emt.tile.solar.water;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityTripleWaterSolar extends TileEntityWaterSolar {
public TileEntityTripleWaterSolar() {
super();
output = EMTConfigHandler.tripleCompressedSolarOutput;
energySource = new BasicSource(this, 40000, 5);
}
@Override
@@ -3,12 +3,15 @@ package emt.tile.solar.water;
import emt.init.EMTBlocks;
import emt.tile.solar.TileEntitySolarBase;
import emt.util.EMTConfigHandler;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class TileEntityWaterSolar extends TileEntitySolarBase {
public TileEntityWaterSolar() {
super();
energySource = new BasicSource(this, 10000, 3);
output = EMTConfigHandler.compressedSolarOutput;
}
@@ -8,12 +8,9 @@ import emt.EMT;
import emt.client.EMTKeys;
import emt.init.EMTItems;
import emt.network.PacketEMTKeys;
import ic2.api.item.IC2Items;
import ic2.core.IC2;
import ic2.core.Ic2Items;
import ic2.core.audio.AudioSource;
import ic2.core.audio.PositionSpec;
import ic2.core.item.tool.ItemElectricToolChainsaw;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@@ -31,6 +31,10 @@ public class EMTConfigHandler {
public static double nanoBootsJump;
public static double quantumBootsJump;
public static double tripleCompressedSolarOutput;
public static double nanoBootsMinDrop;
public static double nanoBootsMaxDrop;
public static double quantumBootsMinDrop;
public static double quantumBootsMaxDrop;
/** Essentias **/
public static double fireOutput;
@@ -106,6 +110,8 @@ public class EMTConfigHandler {
public static boolean infusedQuantumChestplate;
public static boolean aerGeneratorResearch;
public static void init(File file) {
config = new Configuration(file);
syncConfig();
@@ -153,6 +159,12 @@ public class EMTConfigHandler {
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();
nanoBootsMinDrop = config.get(VALUES, "Nano Boots of the Traveller minimum drop", 6.0, "The distance allowed to fall without any damage").getDouble(nanoBootsMinDrop);
nanoBootsMaxDrop = config.get(VALUES, "Nano Boots of the Traveller maximum healthy drop", 35.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(nanoBootsMaxDrop);
quantumBootsMinDrop = config.get(VALUES, "Quantum Boots of the Traveller minimum drop", 10.0, "The distance allowed to fall without any damage").getDouble(quantumBootsMinDrop);
quantumBootsMaxDrop = config.get(VALUES, "Quantum Boots of the Traveller maximum healthy drop", 100.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(quantumBootsMaxDrop);
thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Drill", false).getBoolean(thaumiumDrillResearch);
thaumiumChainsawResearch = config.get(RESEARCH, "Thaumium Chainsaw", false).getBoolean(thaumiumChainsawResearch);
thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Omnitool", false).getBoolean(thaumiumOmnitoolResearch);
@@ -1,10 +1,8 @@
package emt.util;
import emt.init.EMTBlocks;
import emt.init.EMTItems;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class EMTCreativeTab extends CreativeTabs {
+37 -15
View File
@@ -1,39 +1,60 @@
package emt.util;
import java.util.Random;
import baubles.api.BaublesApi;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import emt.EMT;
import emt.client.EMTKeys;
import emt.init.EMTBlocks;
import emt.init.EMTItems;
import emt.network.PacketEMTKeys;
import emt.proxy.ClientProxy;
import emt.item.armor.wings.ItemFeatherWing;
import ic2.api.item.ElectricItem;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
import thaumcraft.common.entities.monster.EntityTaintChicken;
public class EMTEventHandler {
Random rnd = new Random();
@SubscribeEvent
public void onLivingHurt(LivingHurtEvent e) {
if(!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall)
return;
ItemStack s = ((EntityPlayer)e.entityLiving).inventory.armorInventory[2];
if(s == null || !(s.getItem() instanceof ItemFeatherWing)) {
return;
}
e.ammount *= ((ItemFeatherWing)s.getItem()).getFallDamageMult();
}
@SubscribeEvent
public void onPlayerTickEvent(TickEvent.PlayerTickEvent e) {
ItemStack s = e.player.inventory.armorInventory[2];
if(s == null || !(s.getItem() instanceof ItemFeatherWing) || e.phase == Phase.START) {
return;
}
if(e.player.motionY > 0) {
if(e.player.fallDistance > 0)
e.player.fallDistance -= e.player.motionY;
}
}
@SubscribeEvent
public void onEntityLivingDrops(LivingDropsEvent event) {
if (event.entityLiving instanceof EntityCreeper) {
@@ -43,7 +64,7 @@ public class EMTEventHandler {
}
}
if (event.entityLiving instanceof EntityTaintChicken) {
event.entityLiving.entityDropItem(new ItemStack(EMTItems.itemEMTItems, rnd.nextInt(3), 13), 1);
event.entityLiving.entityDropItem(new ItemStack(EMTItems.itemEMTItems, event.entityLiving.worldObj.rand.nextInt(3), 13), 1);
}
}
@@ -96,4 +117,5 @@ public class EMTEventHandler {
e.world.setBlock(e.x, e.y, e.z, EMTBlocks.electricCloud);
}
}
@@ -1,19 +1,10 @@
package emt.util;
import ic2.api.item.ElectricItem;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.ForgeEventFactory;
import java.util.ArrayList;
import java.util.Locale;
import java.util.Random;
public class EMTRandomHelper {
@@ -91,8 +91,9 @@ item.EMT.focus.explosion.name=Wand Focus: Explosion
item.EMT.focus.christmas.name=Wand Focus: Kris-tmas
item.EMT.focus.shield.name=Wand Focus: Shield
item.EMT.focus.charge.name=Wand Focus: Charging
item.EMT.focus.charge_wand.name=Wand Focus: Wand Charging
item.EMT.focus.chargeWand.name=Wand Focus: Wand Charging
item.EMT.focus.electricCloud.name=Electric Cloud
item.EMT.focus.energyBall.name=Energy Ball Focus
#=============Block Names=============
tile.EMT.electricCloud.name=Electric Cloud
@@ -155,11 +156,11 @@ emt.text.Electric Goggles=You have found a way to detect auras using purely elec
emt.rsname.Nanosuit Goggles of Revealing=Nanosuit Goggles of Revealing
emt.tag.Nanosuit Goggles of Revealing=Top-tier eye protection
emt.text.Nanosuit Goggles of Revealing=You have discovered a way to incorporate your previous vis sensors to a Nanosuit Helmet without moving too much around. By infusing the nano helmet with magic, you will be able to use it to see Aura Nodes. During the magical process, the control circuits for the night vision feature are replaced with capacitors to absorb the excess magical energy and vis-sensing microchips. This will prevent you from turning off the night vision effect of the helmet.
emt.text.Nanosuit Goggles of Revealing=You have discovered a way to incorporate your previous vis sensors to a Nanosuit Helmet without moving too much around. By infusing the nano helmet with magic, you will be able to use it to see Aura Nodes. During the magical process, the control circuits for the night vision feature are replaced with capacitors to absorb the excess magical energy and vis-sensing microchips.
emt.rsname.Quantum Goggles of Revealing=Quantum Goggles of Revealing
emt.tag.Quantum Goggles of Revealing=Protection coupled with utility
emt.text.Quantum Goggles of Revealing=It took a lot of trial and error, but you have found a way to slip in vis detection sensors to a Quantum Helmet. By infusing the quantum helmet with magic, you will be able to use it to see Aura Nodes. During the design process, you had to replace several control circuits that involve night vision and automatic feeding with vis detecting circuitry and capacitors to absorb the excess magical energy. You find that using a Mining Laser to contain it can safely focus and direct the explosive pulse where the vision effect and the feeding unit of the helmet lie. Have fun getting force-fed energy. This will prevent you from turning off the night vision and feeding features.
emt.text.Quantum Goggles of Revealing=It took a lot of trial and error, but you have found a way to slip in vis detection sensors to a Quantum Helmet. By infusing the quantum helmet with magic, you will be able to use it to see Aura Nodes. During the design process, you had to replace several control circuits that involve night vision and automatic feeding with vis detecting circuitry and capacitors to absorb the excess magical energy. You find that using a Mining Laser to contain it can safely focus and direct the explosive pulse where the vision effect and the feeding unit of the helmet lie. Have fun getting force-fed energy.
emt.rsname.Iron Omnitool=Iron Omnitool
emt.tag.Iron Omnitool=Changing tools is for peasants
@@ -247,7 +248,7 @@ emt.text.Compressed Solars=You have found a way to compress 9 mundane Solar Pane
emt.rsname.Solar Helmet of Revealing=Solar Helmet of Revealing
emt.tag.Solar Helmet of Revealing=The sunlight hurts my eyes
emt.text.Solar Helmet of Revealing=You now have a helmet that acts exactly like your quantum goggles of revealing, but can also recharge your chest armor! It generates 128 EU/t during the day, and nothing at night.
emt.text.Solar Helmet of Revealing=You now have a helmet that acts exactly like your quantum goggles of revealing, but can also recharge your chest armor! It generates 65536 EU during the day, and 4096 EU at night.
emt.rsname.Diamond Chainsaw=Diamond Chainsaw
emt.tag.Diamond Chainsaw=Harder, better, faster, stronger
@@ -355,4 +356,4 @@ emt.text.Quantum Wings=After exploring all the possibilities of nanotechnologies
emt.rsname.Infused Quantum Armor=Infused Quantum Сhestplate.
emt.tag.Infused Quantum Armor=The last step is here...
emt.text.Infused Quantum Armor=You had been nothing to do and you decided to do something useful. You had an idea in your head of making armor which you can fasten the wings or backpack for being protected in flight. Take the wings or backpack in your hands and sit down to put their on armor. To remove them, hold Shift + "Unequip"(see in options).
emt.text.Infused Quantum Armor=You had been nothing to do and you decided to do something useful. You had an idea in your head of making armor which you can fasten the wings or backpack for being protected in flight. Take the wings or backpack in your hands and sit down to put their on armor. To remove them, hold Shift + "Unequip"(see in options).
@@ -91,7 +91,7 @@ item.EMT.focus.explosion.name=Набалдашник: Взрыв
item.EMT.focus.christmas.name=Набалдашник: Рождество
item.EMT.focus.shield.name=Набалдашник: Щит
item.EMT.focus.charge.name=Набалдашник: Зарядка
item.EMT.focus.charge_wand.name=Набалдашник: Зарядка жезла
item.EMT.focus.chargeWand.name=Набалдашник: Зарядка жезла
item.EMT.focus.energyBall.name=Набалдашник: Наэлектризованное облако
#=============Block Names=============
@@ -155,11 +155,11 @@ emt.text.Electric Goggles=Вы обнаружили способ обнаруж
emt.rsname.Nanosuit Goggles of Revealing=Нано-очки откровения
emt.tag.Nanosuit Goggles of Revealing=Защита глаз высшего уровня
emt.text.Nanosuit Goggles of Revealing=Вы обнаружили способ добавления Ваших предыдущих датчиков Вис, в нано-шлем без особых усилий. Наполнив нано-шлем магией, Вы сможете увидеть узлы ауры. Во время магического процесса, микросхемы для функции ночного зрения заменились конденсаторами, чтобы поглощать избыточную магическую энергию и микрочипы датчиков Вис. Это избавит Вас от выключения эффекта ночного зрения.
emt.text.Nanosuit Goggles of Revealing=Вы обнаружили способ добавления Ваших предыдущих датчиков Вис, в нано-шлем без особых усилий. Наполнив нано-шлем магией, Вы сможете увидеть узлы ауры. Во время магического процесса, микросхемы для функции ночного зрения заменились конденсаторами, чтобы поглощать избыточную магическую энергию и микрочипы датчиков Вис.
emt.rsname.Quantum Goggles of Revealing=Квантовые очки откровения
emt.tag.Quantum Goggles of Revealing=Защита в сочетании с полезностью
emt.text.Quantum Goggles of Revealing=Методом проб и ошибок, Вы обнаружили способ добавления датчиков Вис в квантовой шлем. Наполнив квантовый шлем магией, Вы сможете увидеть узлы ауры. В процессе проектирования, Вам пришлось заменить несколько микросхем, которые включают ночное зрение, автоматическую подачу Вис и конденсаторы, чтобы поглощать избыточную магическую энергию. Вы обнаружили, что использование шахтёрского лазера для сбора магической энергии, может сосредоточить и направить взрывной импульс туда, где эффект зрения и подача шлема - лжёт. Удачи в получении лишней энергии. Это избавит Вас от выключения эффекта ночного зрения и функции подачи.
emt.text.Quantum Goggles of Revealing=Методом проб и ошибок, Вы обнаружили способ добавления датчиков Вис в квантовой шлем. Наполнив квантовый шлем магией, Вы сможете увидеть узлы ауры. В процессе проектирования, Вам пришлось заменить несколько микросхем, которые включают ночное зрение, автоматическую подачу Вис и конденсаторы, чтобы поглощать избыточную магическую энергию. Вы обнаружили, что использование шахтёрского лазера для сбора магической энергии, может сосредоточить и направить взрывной импульс туда, где эффект зрения и подача шлема - лжёт. Удачи в получении лишней энергии.
emt.rsname.Iron Omnitool=Железный мультиинструмент
emt.tag.Iron Omnitool=Смена инструментов для холопов
@@ -247,7 +247,7 @@ emt.text.Compressed Solars=Вы обнаружили способ сжатия
emt.rsname.Solar Helmet of Revealing=Солнечные очки откровения
emt.tag.Solar Helmet of Revealing=Солнечный свет причиняет боль моим глазам!
emt.text.Solar Helmet of Revealing=Теперь у Вас есть шлем, который функционирует, как квантовые очки откровения, но он также может заряжать Вашу кирасу!За один день он генерирует 128 EU/тик, но не ночью.
emt.text.Solar Helmet of Revealing=Теперь у Вас есть шлем, который функционирует, как квантовые очки откровения, но он также может заряжать Вашу кирасу! За один день он генерирует 65536 EU, и 4096 EU ночью.
emt.rsname.Diamond Chainsaw=Алмазная электропила
emt.tag.Diamond Chainsaw=Выносливее, лучше, быстрее, сильнее