aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/core/entity
diff options
context:
space:
mode:
authorConnor-Colenso <52056774+Connor-Colenso@users.noreply.github.com>2023-10-18 17:03:23 +0100
committerGitHub <noreply@github.com>2023-10-18 18:03:23 +0200
commitfbdbb388c369fae549cfde3eed38b536f7461d90 (patch)
treeb46f7fc949d7e4c6e3be910b81ed725e6dc1648e /src/main/java/gtPlusPlus/core/entity
parentb670446fdf49991093b485f0aa14050039632775 (diff)
downloadGT5-Unofficial-fbdbb388c369fae549cfde3eed38b536f7461d90.tar.gz
GT5-Unofficial-fbdbb388c369fae549cfde3eed38b536f7461d90.tar.bz2
GT5-Unofficial-fbdbb388c369fae549cfde3eed38b536f7461d90.zip
Cleaning up (#767)
* Kill playerAPI * Gut more events and compat that is now obsolete * Remove commented out code * Remove final modifier from methods * Make more stuff final * Remove slow building ring * Protected -> private in final classes * More cleaning * More cleaning v2 * Purging * Clean DevHelper * Clean DevHelper 2 * delete DevHelper * remove useless IFMLLoadingPlugin.MCVersion annotation from @Mod files * check for obfuscation only once in the IFMLloadingPlugin.injectData * don't instantiate the static class ASMConfig * delete unused and empty implementation of IFMLCallHook * delete empty class * delete ClassesToTransform class that just holds the class names constants * delete unused methods and unsless logging in dummymod container * delete unused transformer ClassTransformer_TT_ThaumicRestorer * spotless * Clean * Clean utils * Build checkpoint * Purge * Stage 2 * Stage 3 * Stage 4 * Stage 5 * Stage 6 * Spotless * Imports * Stage idk * Stage 1 * Fix issue * Spotless * Format numbers --------- Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Alexdoru <57050655+Alexdoru@users.noreply.github.com> Co-authored-by: Connor Colenso <colen@CONNORSPC>
Diffstat (limited to 'src/main/java/gtPlusPlus/core/entity')
-rw-r--r--src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java41
-rw-r--r--src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java9
-rw-r--r--src/main/java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java141
-rw-r--r--src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java130
-rw-r--r--src/main/java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java314
-rw-r--r--src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinball.java4
-rw-r--r--src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java23
7 files changed, 9 insertions, 653 deletions
diff --git a/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java
index 4be3605ff1..1bd9d09b60 100644
--- a/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java
+++ b/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java
@@ -5,10 +5,7 @@ import gtPlusPlus.GTplusplus;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.entity.monster.EntitySickBlaze;
import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
-import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion;
import gtPlusPlus.core.entity.projectile.EntityLightningAttack;
-import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion;
-import gtPlusPlus.core.entity.projectile.EntityThrowableBomb;
import gtPlusPlus.core.entity.projectile.EntityToxinballSmall;
import gtPlusPlus.core.item.general.spawn.ItemCustomSpawnEgg;
import gtPlusPlus.core.util.Utils;
@@ -20,8 +17,6 @@ public class InternalEntityRegistry {
public static void registerEntities() {
Logger.INFO("Registering GT++ Entities.");
- // EntityRegistry.registerGlobalEntityID(EntityPrimedMiningExplosive.class, "MiningCharge",
- // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 0, 0), Utils.rgbtoHexValue(125, 125, 125));
EntityRegistry.registerModEntity(
EntityPrimedMiningExplosive.class,
"MiningCharge",
@@ -31,31 +26,6 @@ public class InternalEntityRegistry {
20,
true);
- // EntityRegistry.registerGlobalEntityID(EntitySulfuricAcidPotion.class, "throwablePotionSulfuric",
- // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(200, 0, 200), Utils.rgbtoHexValue(125, 125,
- // 125));
- EntityRegistry.registerModEntity(
- EntitySulfuricAcidPotion.class,
- "throwablePotionSulfuric",
- mEntityID++,
- GTplusplus.instance,
- 64,
- 20,
- true);
-
- // EntityRegistry.registerGlobalEntityID(EntityHydrofluoricAcidPotion.class, "throwablePotionHydrofluoric",
- // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 0, 0), Utils.rgbtoHexValue(255, 255, 255));
- EntityRegistry.registerModEntity(
- EntityHydrofluoricAcidPotion.class,
- "throwablePotionHydrofluoric",
- mEntityID++,
- GTplusplus.instance,
- 64,
- 20,
- true);
-
- // EntityRegistry.registerGlobalEntityID(EntityToxinballSmall.class, "toxinBall",
- // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 25, 0), Utils.rgbtoHexValue(0, 125, 0));
EntityRegistry.registerModEntity(
EntityToxinballSmall.class,
"toxinBall",
@@ -65,8 +35,6 @@ public class InternalEntityRegistry {
20,
true);
- // EntityRegistry.registerGlobalEntityID(EntityStaballoyConstruct.class, "constructStaballoy",
- // EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 75, 0), Utils.rgbtoHexValue(50, 220, 50));
EntityRegistry.registerModEntity(
EntityStaballoyConstruct.class,
"constructStaballoy",
@@ -90,15 +58,6 @@ public class InternalEntityRegistry {
Utils.rgbtoHexValue(75, 75, 75));
EntityRegistry.registerModEntity(
- EntityThrowableBomb.class,
- "EntityThrowableBomb",
- mEntityID++,
- GTplusplus.instance,
- 64,
- 10,
- true);
-
- EntityRegistry.registerModEntity(
EntityLightningAttack.class,
"EntityLightningAttack",
mEntityID++,
diff --git a/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java b/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java
index 933109730c..741b830885 100644
--- a/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java
+++ b/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java
@@ -41,7 +41,7 @@ public class EntitySickBlaze extends EntityMob {
@Override
protected void entityInit() {
super.entityInit();
- this.dataWatcher.addObject(mDataWatcherID, new Byte((byte) 0));
+ this.dataWatcher.addObject(mDataWatcherID, 0);
}
/**
@@ -107,13 +107,6 @@ public class EntitySickBlaze extends EntityMob {
}
}
- if (this.rand.nextInt(24) == 0) {
- /*
- * this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.fire", 1.0F +
- * this.rand.nextFloat(), this.rand.nextFloat() * 0.7F + 0.3F);
- */
- }
-
if (!this.onGround && this.motionY < 0.0D) {
this.motionY *= 0.6D;
}
diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java
deleted file mode 100644
index da848575a3..0000000000
--- a/src/main/java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package gtPlusPlus.core.entity.projectile;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityThrowable;
-import net.minecraft.init.Blocks;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.world.World;
-
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.minecraft.BlockPos;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.EntityUtils;
-
-public class EntityHydrofluoricAcidPotion extends EntityThrowable {
-
- public EntityHydrofluoricAcidPotion(World world) {
- super(world);
- }
-
- public EntityHydrofluoricAcidPotion(World world, EntityLivingBase entity) {
- super(world, entity);
- }
-
- public EntityHydrofluoricAcidPotion(World world, double posX, double posY, double posZ) {
- super(world, posX, posY, posZ);
- }
-
- /**
- * Called when this EntityThrowable hits a block or entity.
- */
- @Override
- protected void onImpact(MovingObjectPosition object) {
- int xBlock = object.blockX;
- int yBlock = object.blockY;
- int zBlock = object.blockZ;
- if (object.entityHit != null) {
- byte b0 = 6;
- if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)) {
- object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0);
- EntityUtils.setEntityOnFire(object.entityHit, 5);
-
- if (object.entityHit instanceof EntityPlayer) {
- EntityPlayer mPlayer = (EntityPlayer) object.entityHit;
- mPlayer.addPotionEffect(new PotionEffect(Potion.blindness.getId(), 200, 1));
- mPlayer.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 300, 2));
- mPlayer.addPotionEffect(new PotionEffect(Potion.confusion.getId(), 250, 2));
- }
-
- object.entityHit.fireResistance = 0;
- ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit));
- }
- }
- if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
- ravage(new BlockPos(xBlock, yBlock, zBlock));
- }
-
- String mParticleType = "reddust";
- int e = 0;
- for (int i = 0; i < 24; ++i) {
- if ((e = MathUtils.randInt(0, 5)) <= 1) {
- if (e == 0) mParticleType = "largesmoke";
- if (e == 1) mParticleType = "flame";
- }
- this.worldObj.spawnParticle(
- mParticleType,
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- }
-
- if (!this.worldObj.isRemote) {
- this.setDead();
- }
- }
-
- private boolean ravage(BlockPos blockpos) {
-
- int radius = 2;
-
- for (int i = (blockpos.xPos - radius); i < (blockpos.xPos + radius); i++) {
- for (int j = (blockpos.yPos - radius); j < (blockpos.yPos + radius); j++) {
- for (int h = (blockpos.zPos - radius); h < (blockpos.zPos + radius); h++) {
-
- int mChance = MathUtils.randInt(1, 10);
- if (mChance <= 3) {
- Block mBlockhit = worldObj.getBlock(i, j, h);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
-
- // GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos),
- // mPol);
-
- if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium) {
- worldObj.setBlock(i, j + 1, h, Blocks.fire);
- worldObj.setBlock(i, j, h, Blocks.dirt);
- } else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2) {
- worldObj.setBlock(i, j, h, Blocks.fire);
- } else if (mBlockhit == Blocks.tallgrass) {
- worldObj.setBlock(i, j, h, Blocks.fire);
- if (worldObj.getBlock(i, j - 1, h) == Blocks.grass) {
- worldObj.setBlock(i, j - 1, h, Blocks.dirt);
- }
- } else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block
- || mBlockhit == Blocks.pumpkin
- || mBlockhit == Blocks.potatoes) {
- worldObj.setBlock(i, j + 1, h, Blocks.fire);
- worldObj.setBlock(i, j, h, Blocks.dirt);
- } else
- if (mBlockhit == Blocks.air) {
- worldObj.setBlock(i, j, h, Blocks.fire);
- }
- }
- }
- }
- }
-
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java
deleted file mode 100644
index 3c865de497..0000000000
--- a/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package gtPlusPlus.core.entity.projectile;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.projectile.EntityThrowable;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.world.World;
-
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.minecraft.BlockPos;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.EntityUtils;
-
-public class EntitySulfuricAcidPotion extends EntityThrowable {
-
- public EntitySulfuricAcidPotion(World world) {
- super(world);
- }
-
- public EntitySulfuricAcidPotion(World world, EntityLivingBase entity) {
- super(world, entity);
- }
-
- public EntitySulfuricAcidPotion(World world, double posX, double posY, double posZ) {
- super(world, posX, posY, posZ);
- }
-
- /**
- * Called when this EntityThrowable hits a block or entity.
- */
- @Override
- protected void onImpact(MovingObjectPosition object) {
- int xBlock = object.blockX;
- int yBlock = object.blockY;
- int zBlock = object.blockZ;
- if (object.entityHit != null) {
- byte b0 = 6;
- if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)) {
- object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0);
- EntityUtils.setEntityOnFire(object.entityHit, 10);
- object.entityHit.fireResistance = 0;
- ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit));
- }
- }
- if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
- ravage(new BlockPos(xBlock, yBlock, zBlock));
- }
-
- String mParticleType = "reddust";
- int e = 0;
- for (int i = 0; i < 24; ++i) {
- if ((e = MathUtils.randInt(0, 5)) <= 1) {
- if (e == 0) mParticleType = "largesmoke";
- if (e == 1) mParticleType = "flame";
- }
- this.worldObj.spawnParticle(
- mParticleType,
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- }
-
- if (!this.worldObj.isRemote) {
- this.setDead();
- }
- }
-
- private boolean ravage(BlockPos blockpos) {
-
- int radius = 1;
-
- for (int i = (blockpos.xPos - radius); i < (blockpos.xPos + radius); i++) {
- for (int j = (blockpos.yPos - radius); j < (blockpos.yPos + radius); j++) {
- for (int h = (blockpos.zPos - radius); h < (blockpos.zPos + radius); h++) {
-
- int mChance = MathUtils.randInt(1, 10);
- if (mChance <= 3) {
- Block mBlockhit = worldObj.getBlock(i, j, h);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
-
- // GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos),
- // mPol);
-
- if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium) {
- worldObj.setBlock(i, j + 1, h, Blocks.fire);
- worldObj.setBlock(i, j, h, Blocks.dirt);
- } else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2) {
- worldObj.setBlock(i, j, h, Blocks.fire);
- } else if (mBlockhit == Blocks.tallgrass) {
- worldObj.setBlock(i, j, h, Blocks.fire);
- if (worldObj.getBlock(i, j - 1, h) == Blocks.grass) {
- worldObj.setBlock(i, j - 1, h, Blocks.dirt);
- }
- } else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block
- || mBlockhit == Blocks.pumpkin
- || mBlockhit == Blocks.potatoes) {
- worldObj.setBlock(i, j + 1, h, Blocks.fire);
- worldObj.setBlock(i, j, h, Blocks.dirt);
- } else
- if (mBlockhit == Blocks.air) {
- worldObj.setBlock(i, j, h, Blocks.fire);
- }
- }
- }
- }
- }
-
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java
deleted file mode 100644
index 99ae5ae97c..0000000000
--- a/src/main/java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java
+++ /dev/null
@@ -1,314 +0,0 @@
-package gtPlusPlus.core.entity.projectile;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.projectile.EntityThrowable;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.world.World;
-
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.minecraft.BlockPos;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.EntityUtils;
-import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
-
-public class EntityThrowableBomb extends EntityThrowable {
-
- public EntityThrowableBomb(World world) {
- super(world);
- }
-
- public EntityThrowableBomb(World world, EntityLivingBase entity) {
- super(world, entity);
- }
-
- public EntityThrowableBomb(World world, double posX, double posY, double posZ) {
- super(world, posX, posY, posZ);
- }
-
- /**
- * Called when this EntityThrowable hits a block or entity.
- */
- @Override
- protected void onImpact(MovingObjectPosition object) {
- int xBlock = object.blockX;
- int yBlock = object.blockY;
- int zBlock = object.blockZ;
- if (object.entityHit != null) {
- byte b0 = 6;
- if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)) {
- object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 20);
- EntityUtils.setEntityOnFire(object.entityHit, 20);
- object.entityHit.fireResistance = 0;
- ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit));
- }
- }
- if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
-
- ravage(new BlockPos(xBlock, yBlock, zBlock));
- for (BlockPos aSur : new BlockPos(xBlock, yBlock, zBlock).getSurroundingBlocks()) {
- ravage(new BlockPos(aSur.xPos, aSur.yPos, aSur.zPos));
- for (BlockPos aSur2 : new BlockPos(aSur.xPos, aSur.yPos, aSur.zPos).getSurroundingBlocks()) {
- // ravage(new BlockPos(aSur2.xPos, aSur2.yPos, aSur2.zPos));
- }
- }
- }
-
- String mParticleType = "reddust";
- int e = 0;
- for (int i = 0; i < 127; ++i) {
- if ((e = MathUtils.randInt(0, 5)) <= 1) {
- if (e == 0) mParticleType = "largesmoke";
- if (e == 1) mParticleType = "flame";
- }
- this.worldObj.spawnParticle(
- mParticleType,
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- }
-
- if (!this.worldObj.isRemote) {
- this.setDead();
- }
- }
-
- private boolean ravage(BlockPos blockpos) {
-
- int radius = 5;
-
- for (int i = (blockpos.xPos - radius); i < (blockpos.xPos + radius); i++) {
- for (int j = (blockpos.yPos - radius); j < (blockpos.yPos + radius); j++) {
- for (int h = (blockpos.zPos - radius); h < (blockpos.zPos + radius); h++) {
-
- int mChance = MathUtils.randInt(0, 100);
- if (mChance <= 3) {
- Block mBlockhit = worldObj.getBlock(i, j, h);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "flame",
- this.posX + MathUtils.randDouble(-2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
- this.worldObj.spawnParticle(
- "largesmoke",
- this.posX + MathUtils.randDouble(2, 2),
- this.posY + MathUtils.randDouble(-2, 2),
- this.posZ + MathUtils.randDouble(-2, 2),
- 0.0D,
- 0.0D,
- 0.0D);
-
- PollutionUtils
- .addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), 500);
- this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.01f, true);
- if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium) {
- worldObj.setBlock(i, j + 1, h, Blocks.fire);
- worldObj.setBlock(i, j, h, Blocks.dirt);
- } else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2) {
- worldObj.setBlock(i, j, h, Blocks.fire);
- } else if (mBlockhit == Blocks.tallgrass) {
- worldObj.setBlock(i, j, h, Blocks.fire);
- if (worldObj.getBlock(i, j - 1, h) == Blocks.grass) {
- worldObj.setBlock(i, j - 1, h, Blocks.dirt);
- }
- } else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block
- || mBlockhit == Blocks.pumpkin
- || mBlockhit == Blocks.potatoes) {
- worldObj.setBlock(i, j + 1, h, Blocks.fire);
- worldObj.setBlock(i, j, h, Blocks.dirt);
- } else
- if (mBlockhit == Blocks.air) {
- worldObj.setBlock(i, j, h, Blocks.fire);
- }
- }
- }
- }
- }
-
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinball.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinball.java
index 6c490ca693..da1a59600d 100644
--- a/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinball.java
+++ b/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinball.java
@@ -134,8 +134,8 @@ public abstract class EntityToxinball extends EntityFireball {
this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
double d0 = 0.0D;
- for (int i = 0; i < list.size(); ++i) {
- Entity entity1 = (Entity) list.get(i);
+ for (Object o : list) {
+ Entity entity1 = (Entity) o;
if (entity1.canBeCollidedWith()
&& (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) {
diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java
index d2d7836f3d..f2f8b8a8cc 100644
--- a/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java
+++ b/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java
@@ -41,23 +41,12 @@ public class EntityToxinballSmall extends EntityToxinball {
int k = MoP.blockZ;
switch (MoP.sideHit) {
- case 0:
- --j;
- break;
- case 1:
- ++j;
- break;
- case 2:
- --k;
- break;