Closes #30 , now no fall damage only have quantum/nano wings ( Closes #29 )

This commit is contained in:
fewizz committed 2016-10-13 16:14:49 +03:00
1 parent f2e17fab72
commit 44114660b1
5 files changed
+11 -8

No files matched your search

@@ -31,7 +31,7 @@ public class BlockElectricCloud extends BlockBase {
public BlockElectricCloud(String unlocName) {
super(unlocName, Material.cloth, soundTypeCloth, 0.1f);
setBlockBounds(0.3f, 0.3f, 0.3f, 0.7f, 0.7f, 0.7f);
//setBlockBounds(0.3f, 0.3f, 0.3f, 0.7f, 0.7f, 0.7f);
}
@SideOnly(Side.CLIENT)
@@ -65,7 +65,7 @@ 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) {
@@ -115,9 +115,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;
}
}
}
@@ -66,6 +66,9 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
this.useWings(player, stack, world, 0.25f, 0.6f, 0.3f, 5);
if (player.fallDistance > 0.0F) {
player.fallDistance = 0;
}
}
@Override
@@ -39,6 +39,9 @@ public class ItemQuantumWing extends ItemNanoWing {
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
this.useWings(player, stack, world, 0.33f, 0.5f, 0.2f, 7);
if (player.fallDistance > 0.0F) {
player.fallDistance = 0;
}
}
@Override
@@ -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();
}
@@ -37,7 +38,7 @@ public class TileElectricCloud extends TileEntity {
}
}
if (worldObj.rand.nextInt(3) == 0) {
if (worldObj.rand.nextInt(5) == 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);