Compare commits

..
23 Commits
Author SHA1 Message Date
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
25 changed files with 122 additions and 40 deletions

No files matched your search

+2 -1
View File
@@ -41,4 +41,5 @@ ehthumbs.db
Thumbs.db
#Vim backups
*~
*~
*.bat
+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.1
mod_version=1.2.6.4
mod_name=ElectroMagicTools
+1 -1
View File
@@ -36,7 +36,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.1";
public static final String VERSION = "1.2.6.4";
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";
@@ -85,7 +85,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, 20000000, 12000.0D, 4);
MinecraftForge.EVENT_BUS.register(this);
this.setCreativeTab(EMT.TAB);
}
@@ -29,8 +29,8 @@ 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 visDiscount = 5;
@@ -24,7 +24,7 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
this.setMaxStackSize(1);
visDiscount = 6;
tier = 3;
maxCharge = 100000;
maxCharge = 1000000;
energyPerDamage = 1000;
transferLimit = 100;
}
@@ -31,7 +31,7 @@ public class ItemQuantumGoggles extends ItemNanoGoggles {
this.setMaxDamage(27);
this.setMaxStackSize(1);
maxCharge = 10000000;
tier = 3;
tier = 4;
visDiscount = 8;
transferLimit = 10000;
energyPerDamage = 1000;
@@ -44,10 +44,10 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
this.maxCharge = 1000000;
this.genDay = 256;
this.genNight = 128;
maxCharge = 10000000;
maxCharge = 20000000;
visDiscount = 7;
tier = 3;
transferLimit = 10000;
tier = 4;
transferLimit = 20000;
energyPerDamage = 10000;
potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000));
@@ -20,12 +20,11 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MathHelper;
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 +32,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 +67,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 +96,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 +118,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;
}
}
}
@@ -25,7 +25,7 @@ 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;
@@ -37,6 +37,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 +136,11 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
}
public double getDamageAbsorptionRatio() {
return 1.1000000000000001D;
return 1.5999999999999991D;
}
private double getBaseAbsorptionRatio() {
return 0.14999999999999999D;
return 0.17999999999999999D;
}
/* IC2 API METHODS */
@@ -4,15 +4,19 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.util.EMTConfigHandler;
import ic2.api.item.ElectricItem;
import net.minecraft.client.Minecraft;
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.util.DamageSource;
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);
@@ -23,6 +27,11 @@ public class ItemQuantumWing extends ItemNanoWing {
transferLimit = 10000;
energyPerDamage = 1000;
}
@Override
public float getFallDamageMult() {
return 0.0F;
}
@SideOnly(Side.CLIENT)
@Override
@@ -45,4 +54,29 @@ public class ItemQuantumWing extends ItemNanoWing {
public double getMaxCharge(ItemStack itemStack) {
return maxCharge;
}
@Override
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
}
public double getDamageAbsorptionRatio() {
return 2.099990000000001D;
}
private double getBaseAbsorptionRatio() {
return 0.20999999999999999D;
}
@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);
} 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);
}
}
}
@@ -31,6 +31,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) {
@@ -26,7 +26,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;
@@ -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;
@@ -40,7 +40,7 @@ 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;
@@ -37,7 +37,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;
@@ -23,7 +23,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;
}
@@ -22,7 +22,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,5 +1,6 @@
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;
@@ -17,7 +18,7 @@ public class TileElectricCloud extends TileEntity {
@Override
public void updateEntity() {
if(FMLCommonHandler.instance().getSide().isClient())
if(worldObj.isRemote && FMLCommonHandler.instance().getSide().isClient() && FMLClientHandler.instance().getClient().renderViewEntity != null)
fx();
}
+39 -3
View File
@@ -6,12 +6,15 @@ 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;
import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
import emt.EMT;
import emt.client.EMTKeys;
import emt.init.EMTBlocks;
import emt.init.EMTItems;
import emt.item.armor.wings.ItemFeatherWing;
import emt.network.PacketEMTKeys;
import emt.proxy.ClientProxy;
import ic2.api.item.ElectricItem;
@@ -24,7 +27,11 @@ 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.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.living.LivingFallEvent;
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;
@@ -32,8 +39,36 @@ 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 +78,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 +131,5 @@ public class EMTEventHandler {
e.world.setBlock(e.x, e.y, e.z, EMTBlocks.electricCloud);
}
}
@@ -93,6 +93,7 @@ item.EMT.focus.shield.name=Wand Focus: Shield
item.EMT.focus.charge.name=Wand Focus: 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
@@ -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).