aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util/entity
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2017-03-04 12:58:47 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2017-03-04 12:58:47 +1000
commitae21012d216df71f31aed6fbc9d76215fc24ceed (patch)
treecc89accbe6ce5c04b72ed3c5e46b2a185f88be6a /src/Java/gtPlusPlus/core/util/entity
parentba89972a22a316030f8c3bd99974f915b1d7aefc (diff)
downloadGT5-Unofficial-ae21012d216df71f31aed6fbc9d76215fc24ceed.tar.gz
GT5-Unofficial-ae21012d216df71f31aed6fbc9d76215fc24ceed.tar.bz2
GT5-Unofficial-ae21012d216df71f31aed6fbc9d76215fc24ceed.zip
+ New texture for the slow builders ring.
+ Added the Alkalus Disk. $ Fixed Frame Box Assembler Recipes. $ Fixed Missing 7Li material. $ Fixed Tiered Tanks not showing their capacity in the tooltip. $ Fixed tooltips for alloys containing Bronze or Steel. $ Fixed Clay Pipe Extruder Recipes. - Removed a handful of Plasma cells for misc. materials. % Changed the Industrial Coke Oven's tooltip, to better describe the input/output requirements. % Cleaned up The Entire Project.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/entity')
-rw-r--r--src/Java/gtPlusPlus/core/util/entity/EntityUtils.java40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java
index 4749a103d1..e5c52939ac 100644
--- a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java
+++ b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java
@@ -1,5 +1,6 @@
package gtPlusPlus.core.util.entity;
+import cpw.mods.fml.common.registry.EntityRegistry;
import ic2.core.IC2Potion;
import ic2.core.item.armor.ItemArmorHazmat;
import net.minecraft.block.Block;
@@ -7,43 +8,42 @@ import net.minecraft.entity.*;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
-import cpw.mods.fml.common.registry.EntityRegistry;
public class EntityUtils {
- public static void setEntityOnFire(Entity entity, int length){
+ public static void setEntityOnFire(final Entity entity, final int length){
entity.setFire(length);
}
- public static int getFacingDirection(Entity entity){
- int d = MathHelper.floor_double((double) (entity.rotationYaw * 4.0F / 360) + 0.50) & 3;
+ public static int getFacingDirection(final Entity entity){
+ final int d = MathHelper.floor_double((entity.rotationYaw * 4.0F) / 360 + 0.50) & 3;
return d;
}
@Deprecated
- public static Block findBlockUnderEntityNonBoundingBox(Entity parEntity){
- int blockX = MathHelper.floor_double(parEntity.posX);
- int blockY = MathHelper.floor_double(parEntity.posY-0.2D - (double)parEntity.yOffset);
- int blockZ = MathHelper.floor_double(parEntity.posZ);
+ public static Block findBlockUnderEntityNonBoundingBox(final Entity parEntity){
+ final int blockX = MathHelper.floor_double(parEntity.posX);
+ final int blockY = MathHelper.floor_double(parEntity.posY-0.2D - parEntity.yOffset);
+ final int blockZ = MathHelper.floor_double(parEntity.posZ);
return parEntity.worldObj.getBlock(blockX, blockY, blockZ);
}
- public static Block findBlockUnderEntity(Entity parEntity){
- int blockX = MathHelper.floor_double(parEntity.posX);
- int blockY = MathHelper.floor_double(parEntity.boundingBox.minY)-1;
- int blockZ = MathHelper.floor_double(parEntity.posZ);
+ public static Block findBlockUnderEntity(final Entity parEntity){
+ final int blockX = MathHelper.floor_double(parEntity.posX);
+ final int blockY = MathHelper.floor_double(parEntity.boundingBox.minY)-1;
+ final int blockZ = MathHelper.floor_double(parEntity.posZ);
return parEntity.worldObj.getBlock(blockX, blockY, blockZ);
}
//TODO
- public static void registerEntityToBiomeSpawns(Class<EntityLiving> classy, EnumCreatureType EntityType, BiomeGenBase baseBiomeGen){
- EntityRegistry.addSpawn(classy, 6, 1, 5, EntityType, baseBiomeGen); //change the values to vary the spawn rarity, biome, etc.
+ public static void registerEntityToBiomeSpawns(final Class<EntityLiving> classy, final EnumCreatureType EntityType, final BiomeGenBase baseBiomeGen){
+ EntityRegistry.addSpawn(classy, 6, 1, 5, EntityType, baseBiomeGen); //change the values to vary the spawn rarity, biome, etc.
}
- public static boolean applyRadiationDamageToEntity(int damage, World world, Entity entityHolding){
- if (!world.isRemote){
- if (damage > 0 && (entityHolding instanceof EntityLivingBase)) {
- EntityLivingBase entityLiving = (EntityLivingBase) entityHolding;
+ public static boolean applyRadiationDamageToEntity(final int damage, final World world, final Entity entityHolding){
+ if (!world.isRemote){
+ if ((damage > 0) && (entityHolding instanceof EntityLivingBase)) {
+ final EntityLivingBase entityLiving = (EntityLivingBase) entityHolding;
if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving)) {
int duration;
if (entityLiving.getActivePotionEffect(IC2Potion.radiation) != null){
@@ -53,13 +53,13 @@ public class EntityUtils {
else {
//Utils.LOG_INFO("f");
duration = damage*30;
- }
+ }
IC2Potion.radiation.applyTo(entityLiving, duration, damage * 15);
}
}
return true;
}
- return false;
+ return false;
}
}