aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/entities
diff options
context:
space:
mode:
authorRaven Szewczyk <git@eigenraven.me>2022-08-27 10:19:57 +0100
committerGitHub <noreply@github.com>2022-08-27 11:19:57 +0200
commit6f31720697bcc351421a4d86ba3bf749375dd12c (patch)
tree3adf8f318f22c892d74cd7c9d30b6dd3f11f11bd /src/main/java/gregtech/common/entities
parentc3eac50decd33ee2be8703dfb2ecf9cdc31c2b67 (diff)
downloadGT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.tar.gz
GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.tar.bz2
GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.zip
Update buildscript & apply spotless (#1306)
* Update dependencies * Update buildscript, apply spotless
Diffstat (limited to 'src/main/java/gregtech/common/entities')
-rw-r--r--src/main/java/gregtech/common/entities/GT_EntityFXPollution.java7
-rw-r--r--src/main/java/gregtech/common/entities/GT_Entity_Arrow.java185
-rw-r--r--src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java17
3 files changed, 151 insertions, 58 deletions
diff --git a/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java
index b44f90f7ea..5cb81ab20d 100644
--- a/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java
+++ b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java
@@ -1,14 +1,13 @@
package gregtech.common.entities;
+import java.util.Random;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.world.World;
-import java.util.Random;
-
public class GT_EntityFXPollution extends EntityFX {
public GT_EntityFXPollution(World world, double x, double y, double z) {
- super(world, x, y, z,0 ,0 ,0);
+ super(world, x, y, z, 0, 0, 0);
this.particleRed = 0.25F;
this.particleGreen = 0.2F;
@@ -26,7 +25,7 @@ public class GT_EntityFXPollution extends EntityFX {
this.particleTextureIndexX = 0;
this.particleTextureIndexY = 0;
- this.particleMaxAge = (int)((double)20 / ((double)random.nextFloat() * 0.8D + 0.2D));
+ this.particleMaxAge = (int) ((double) 20 / ((double) random.nextFloat() * 0.8D + 0.2D));
this.particleScale *= 0.75F;
this.noClip = true;
diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java
index d6e2995500..028b3199f7 100644
--- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java
+++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java
@@ -6,6 +6,8 @@ import gregtech.api.objects.ItemData;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.WorldSpawnedEventBuilder;
+import java.util.List;
+import java.util.UUID;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.enchantment.Enchantment;
@@ -28,9 +30,6 @@ import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.util.FakePlayerFactory;
-import java.util.List;
-import java.util.UUID;
-
public class GT_Entity_Arrow extends EntityArrow {
private int mHitBlockX = -1;
private int mHitBlockY = -1;
@@ -73,8 +72,10 @@ public class GT_Entity_Arrow extends EntityArrow {
Entity tShootingEntity = this.shootingEntity;
if ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F)) {
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
- this.prevRotationYaw = (this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D));
- this.prevRotationPitch = (this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / 3.141592653589793D));
+ this.prevRotationYaw =
+ (this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D));
+ this.prevRotationPitch =
+ (this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / 3.141592653589793D));
}
if (this.mTicksAlive++ == 3000) {
setDead();
@@ -82,8 +83,10 @@ public class GT_Entity_Arrow extends EntityArrow {
Block tBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
if (tBlock.getMaterial() != Material.air) {
tBlock.setBlockBoundsBasedOnState(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- AxisAlignedBB axisalignedbb = tBlock.getCollisionBoundingBoxFromPool(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- if ((axisalignedbb != null) && (axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))) {
+ AxisAlignedBB axisalignedbb = tBlock.getCollisionBoundingBoxFromPool(
+ this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
+ if ((axisalignedbb != null)
+ && (axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))) {
this.inGround = true;
}
}
@@ -103,15 +106,21 @@ public class GT_Entity_Arrow extends EntityArrow {
} else {
this.ticksInAir += 1;
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
- Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ Vec3 vec3 = Vec3.createVectorHelper(
+ this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
MovingObjectPosition tVector = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
- vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ vec3 = Vec3.createVectorHelper(
+ this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
if (tVector != null) {
vec3 = Vec3.createVectorHelper(tVector.hitVec.xCoord, tVector.hitVec.yCoord, tVector.hitVec.zCoord);
}
Entity tHitEntity = null;
- List tAllPotentiallyHitEntities = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
+ List tAllPotentiallyHitEntities = this.worldObj.getEntitiesWithinAABBExcludingEntity(
+ this,
+ this.boundingBox
+ .addCoord(this.motionX, this.motionY, this.motionZ)
+ .expand(1.0D, 1.0D, 1.0D));
double tLargestDistance = 1.7976931348623157E+308D;
for (int i = 0; i < tAllPotentiallyHitEntities.size(); i++) {
Entity entity1 = (Entity) tAllPotentiallyHitEntities.get(i);
@@ -132,7 +141,9 @@ public class GT_Entity_Arrow extends EntityArrow {
}
if ((tVector != null) && ((tVector.entityHit instanceof EntityPlayer))) {
EntityPlayer entityplayer = (EntityPlayer) tVector.entityHit;
- if ((entityplayer.capabilities.disableDamage) || (((tShootingEntity instanceof EntityPlayer)) && (!((EntityPlayer) tShootingEntity).canAttackPlayer(entityplayer)))) {
+ if ((entityplayer.capabilities.disableDamage)
+ || (((tShootingEntity instanceof EntityPlayer))
+ && (!((EntityPlayer) tShootingEntity).canAttackPlayer(entityplayer)))) {
tVector = null;
}
}
@@ -140,17 +151,37 @@ public class GT_Entity_Arrow extends EntityArrow {
if (tVector.entityHit != null) {
ItemData tData = GT_OreDictUnificator.getItemData(this.mArrow);
-
- float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase) ? EnchantmentHelper.func_152377_a(this.mArrow, ((EntityLivingBase) tVector.entityHit).getCreatureAttribute()) : 0.0F;
- float tDamage = MathHelper.ceiling_double_int(MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ) * (getDamage() + ((tData != null) && (tData.mMaterial != null) && (tData.mMaterial.mMaterial != null) ? tData.mMaterial.mMaterial.mToolQuality / 2.0F - 1.0F : 0.0F)));
+ float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase)
+ ? EnchantmentHelper.func_152377_a(
+ this.mArrow, ((EntityLivingBase) tVector.entityHit).getCreatureAttribute())
+ : 0.0F;
+ float tDamage = MathHelper.ceiling_double_int(MathHelper.sqrt_double(this.motionX * this.motionX
+ + this.motionY * this.motionY
+ + this.motionZ * this.motionZ)
+ * (getDamage()
+ + ((tData != null)
+ && (tData.mMaterial != null)
+ && (tData.mMaterial.mMaterial != null)
+ ? tData.mMaterial.mMaterial.mToolQuality / 2.0F - 1.0F
+ : 0.0F)));
if (getIsCritical()) {
tDamage += this.rand.nextInt((int) (tDamage / 2.0D + 2.0D));
}
- int tFireDamage = (isBurning() ? 5 : 0) + 4 * EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow);
- int tKnockback = this.mKnockback + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, this.mArrow);
+ int tFireDamage = (isBurning() ? 5 : 0)
+ + 4 * EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow);
+ int tKnockback = this.mKnockback
+ + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, this.mArrow);
int tHitTimer = -1;
- int[] tDamages = onHitEntity(tVector.entityHit, tShootingEntity == null ? this : tShootingEntity, this.mArrow == null ? new ItemStack(Items.arrow, 1) : this.mArrow, (int) (tDamage * 2.0F), (int) (tMagicDamage * 2.0F), tKnockback, tFireDamage, tHitTimer);
+ int[] tDamages = onHitEntity(
+ tVector.entityHit,
+ tShootingEntity == null ? this : tShootingEntity,
+ this.mArrow == null ? new ItemStack(Items.arrow, 1) : this.mArrow,
+ (int) (tDamage * 2.0F),
+ (int) (tMagicDamage * 2.0F),
+ tKnockback,
+ tFireDamage,
+ tHitTimer);
if (tDamages != null) {
tDamage = tDamages[0] / 2.0F;
tMagicDamage = tDamages[1] / 2.0F;
@@ -160,10 +191,18 @@ public class GT_Entity_Arrow extends EntityArrow {
if ((tFireDamage > 0) && (!(tVector.entityHit instanceof EntityEnderman))) {
tVector.entityHit.setFire(tFireDamage);
}
- if ((!(tHitEntity instanceof EntityPlayer)) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, this.mArrow) > 0)) {
+ if ((!(tHitEntity instanceof EntityPlayer))
+ && (EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, this.mArrow)
+ > 0)) {
EntityPlayer tPlayer = null;
if ((this.worldObj instanceof WorldServer)) {
- tPlayer = FakePlayerFactory.get((WorldServer) this.worldObj, new GameProfile(new UUID(0L, 0L), (tShootingEntity instanceof EntityLivingBase) ? ((EntityLivingBase) tShootingEntity).getCommandSenderName() : "Arrow"));
+ tPlayer = FakePlayerFactory.get(
+ (WorldServer) this.worldObj,
+ new GameProfile(
+ new UUID(0L, 0L),
+ (tShootingEntity instanceof EntityLivingBase)
+ ? ((EntityLivingBase) tShootingEntity).getCommandSenderName()
+ : "Arrow"));
}
if (tPlayer != null) {
tPlayer.inventory.currentItem = 0;
@@ -172,35 +211,59 @@ public class GT_Entity_Arrow extends EntityArrow {
tPlayer.setDead();
}
}
- DamageSource tDamageSource = DamageSource.causeArrowDamage(this, tShootingEntity == null ? this : tShootingEntity);
- if ((tDamage + tMagicDamage > 0.0F) && (tVector.entityHit.attackEntityFrom(tDamageSource, tDamage + tMagicDamage))) {
+ DamageSource tDamageSource =
+ DamageSource.causeArrowDamage(this, tShootingEntity == null ? this : tShootingEntity);
+ if ((tDamage + tMagicDamage > 0.0F)
+ && (tVector.entityHit.attackEntityFrom(tDamageSource, tDamage + tMagicDamage))) {
if ((tVector.entityHit instanceof EntityLivingBase)) {
if (tHitTimer >= 0) {
tVector.entityHit.hurtResistantTime = tHitTimer;
}
- if (((tVector.entityHit instanceof EntityCreeper)) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 0)) {
+ if (((tVector.entityHit instanceof EntityCreeper))
+ && (EnchantmentHelper.getEnchantmentLevel(
+ Enchantment.fireAspect.effectId, this.mArrow)
+ > 0)) {
((EntityCreeper) tVector.entityHit).func_146079_cb();
}
EntityLivingBase tHitLivingEntity = (EntityLivingBase) tVector.entityHit;
if (!this.worldObj.isRemote) {
- tHitLivingEntity.setArrowCountInEntity(tHitLivingEntity.getArrowCountInEntity() + 1);
+ tHitLivingEntity.setArrowCountInEntity(
+ tHitLivingEntity.getArrowCountInEntity() + 1);
}
if (tKnockback > 0) {
- float tKnockbackDivider = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ float tKnockbackDivider = MathHelper.sqrt_double(
+ this.motionX * this.motionX + this.motionZ * this.motionZ);
if (tKnockbackDivider > 0.0F) {
- tHitLivingEntity.addVelocity(this.motionX * tKnockback * 0.6000000238418579D / tKnockbackDivider, 0.1D, this.motionZ * tKnockback * 0.6000000238418579D / tKnockbackDivider);
+ tHitLivingEntity.addVelocity(
+ this.motionX * tKnockback * 0.6000000238418579D / tKnockbackDivider,
+ 0.1D,
+ this.motionZ * tKnockback * 0.6000000238418579D / tKnockbackDivider);
}
}
- GT_Utility.GT_EnchantmentHelper.applyBullshitA(tHitLivingEntity, tShootingEntity == null ? this : tShootingEntity, this.mArrow);
- GT_Utility.GT_EnchantmentHelper.applyBullshitB((tShootingEntity instanceof EntityLivingBase) ? (EntityLivingBase) tShootingEntity : null, tHitLivingEntity, this.mArrow);
- if ((tShootingEntity != null) && (tHitLivingEntity != tShootingEntity) && ((tHitLivingEntity instanceof EntityPlayer)) && ((tShootingEntity instanceof EntityPlayerMP))) {
- ((EntityPlayerMP) tShootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F));
+ GT_Utility.GT_EnchantmentHelper.applyBullshitA(
+ tHitLivingEntity,
+ tShootingEntity == null ? this : tShootingEntity,
+ this.mArrow);
+ GT_Utility.GT_EnchantmentHelper.applyBullshitB(
+ (tShootingEntity instanceof EntityLivingBase)
+ ? (EntityLivingBase) tShootingEntity
+ : null,
+ tHitLivingEntity,
+ this.mArrow);
+ if ((tShootingEntity != null)
+ && (tHitLivingEntity != tShootingEntity)
+ && ((tHitLivingEntity instanceof EntityPlayer))
+ && ((tShootingEntity instanceof EntityPlayerMP))) {
+ ((EntityPlayerMP) tShootingEntity)
+ .playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F));
}
}
if (((tShootingEntity instanceof EntityPlayer)) && (tMagicDamage > 0.0F)) {
((EntityPlayer) tShootingEntity).onEnchantmentCritical(tVector.entityHit);
}
- if ((!(tVector.entityHit instanceof EntityEnderman)) || (((EntityEnderman) tVector.entityHit).getActivePotionEffect(Potion.weakness) != null)) {
+ if ((!(tVector.entityHit instanceof EntityEnderman))
+ || (((EntityEnderman) tVector.entityHit).getActivePotionEffect(Potion.weakness)
+ != null)) {
if (tFireDamage > 0) {
tVector.entityHit.setFire(tFireDamage);
}
@@ -221,11 +284,13 @@ public class GT_Entity_Arrow extends EntityArrow {
this.mHitBlockY = tVector.blockY;
this.mHitBlockZ = tVector.blockZ;
this.mHitBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- this.mHitBlockMeta = this.worldObj.getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
+ this.mHitBlockMeta =
+ this.worldObj.getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
this.motionX = ((float) (tVector.hitVec.xCoord - this.posX));
this.motionY = ((float) (tVector.hitVec.yCoord - this.posY));
this.motionZ = ((float) (tVector.hitVec.zCoord - this.posZ));
- float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
+ float f2 = MathHelper.sqrt_double(
+ this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
this.posX -= this.motionX / f2 * 0.0500000007450581D;
this.posY -= this.motionY / f2 * 0.0500000007450581D;
this.posZ -= this.motionZ / f2 * 0.0500000007450581D;
@@ -234,37 +299,44 @@ public class GT_Entity_Arrow extends EntityArrow {
this.arrowShake = 7;
setIsCritical(false);
if (this.mHitBlock.getMaterial() != Material.air) {
- this.mHitBlock.onEntityCollidedWithBlock(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, this);
+ this.mHitBlock.onEntityCollidedWithBlock(
+ this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, this);
}
- if ((!this.worldObj.isRemote) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 2)) {
- GT_Utility.setCoordsOnFire(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, true);
+ if ((!this.worldObj.isRemote)
+ && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow)
+ > 2)) {
+ GT_Utility.setCoordsOnFire(
+ this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, true);
}
if (breaksOnImpact()) {
setDead();
}
}
}
- WorldSpawnedEventBuilder.ParticleEventBuilder events = new WorldSpawnedEventBuilder.ParticleEventBuilder()
- .setWorld(this.worldObj);
+ WorldSpawnedEventBuilder.ParticleEventBuilder events =
+ new WorldSpawnedEventBuilder.ParticleEventBuilder().setWorld(this.worldObj);
if (getIsCritical()) {
events.setIdentifier(ParticleFX.CRIT)
.setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ)
- .<WorldSpawnedEventBuilder.ParticleEventBuilder>times(4, (x, i) ->
- x.setPosition(
- this.posX + this.motionX * i / 4.0D,
- this.posY + this.motionY * i / 4.0D,
- this.posZ + this.motionZ * i / 4.0D
- ).run()
- );
+ .<WorldSpawnedEventBuilder.ParticleEventBuilder>times(4, (x, i) -> x.setPosition(
+ this.posX + this.motionX * i / 4.0D,
+ this.posY + this.motionY * i / 4.0D,
+ this.posZ + this.motionZ * i / 4.0D)
+ .run());
}
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
this.rotationYaw = ((float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D));
- for (this.rotationPitch = ((float) (Math.atan2(this.motionY, MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ)) * 180.0D / 3.141592653589793D)); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) {
- }
+ for (this.rotationPitch = ((float) (Math.atan2(
+ this.motionY,
+ MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ))
+ * 180.0D
+ / 3.141592653589793D));
+ this.rotationPitch - this.prevRotationPitch < -180.0F;
+ this.prevRotationPitch -= 360.0F) {}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F) {
this.prevRotationPitch += 360.0F;
}
@@ -283,8 +355,7 @@ public class GT_Entity_Arrow extends EntityArrow {
.setPosition(
this.posX - this.motionX * 0.25D,
this.posY - this.motionY * 0.25D,
- this.posZ - this.motionZ * 0.25D
- )
+ this.posZ - this.motionZ * 0.25D)
.times(4, Runnable::run);
tFrictionMultiplier = 0.8F;
}
@@ -334,15 +405,27 @@ public class GT_Entity_Arrow extends EntityArrow {
@Override
public void onCollideWithPlayer(EntityPlayer aPlayer) {
- if ((!this.worldObj.isRemote) && (this.inGround) && (this.arrowShake <= 0) && (this.canBePickedUp == 1) && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) {
+ if ((!this.worldObj.isRemote)
+ && (this.inGround)
+ && (this.arrowShake <= 0)
+ && (this.canBePickedUp == 1)
+ && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) {
playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
aPlayer.onItemPickup(this, 1);
setDead();
}
}
- public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) {
- return new int[]{aRegularDamage, aMagicDamage, aKnockback, aFireDamage, aHitTimer};
+ public int[] onHitEntity(
+ Entity aHitEntity,
+ Entity aShootingEntity,
+ ItemStack aArrow,
+ int aRegularDamage,
+ int aMagicDamage,
+ int aKnockback,
+ int aFireDamage,
+ int aHitTimer) {
+ return new int[] {aRegularDamage, aMagicDamage, aKnockback, aFireDamage, aHitTimer};
}
public ItemStack getArrowItem() {
diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java
index ccf645bf1c..ec98099ba8 100644
--- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java
+++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java
@@ -50,14 +50,25 @@ public class GT_Entity_Arrow_Potion extends GT_Entity_Arrow {
}
@Override
- public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) {
+ public int[] onHitEntity(
+ Entity aHitEntity,
+ Entity aShootingEntity,
+ ItemStack aArrow,
+ int aRegularDamage,
+ int aMagicDamage,
+ int aKnockback,
+ int aFireDamage,
+ int aHitTimer) {
if ((aHitEntity instanceof EntityLivingBase)) {
for (int i = 3; i < this.mPotions.length; i += 4) {
if (aHitEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) {
- ((EntityLivingBase) aHitEntity).addPotionEffect(new PotionEffect(this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false));
+ ((EntityLivingBase) aHitEntity)
+ .addPotionEffect(new PotionEffect(
+ this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false));
}
}
}
- return super.onHitEntity(aHitEntity, aShootingEntity, aArrow, 1, aMagicDamage, aKnockback, aFireDamage, aHitTimer);
+ return super.onHitEntity(
+ aHitEntity, aShootingEntity, aArrow, 1, aMagicDamage, aKnockback, aFireDamage, aHitTimer);
}
}