From dc3df3edd5843bde0c1335d6a8e460b2c832aa48 Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Sat, 17 Jun 2017 08:12:18 +0300 Subject: full project files --- ihl/explosion/IHLEntityFallingPile.java | 152 -------------------------------- 1 file changed, 152 deletions(-) delete mode 100644 ihl/explosion/IHLEntityFallingPile.java (limited to 'ihl/explosion/IHLEntityFallingPile.java') diff --git a/ihl/explosion/IHLEntityFallingPile.java b/ihl/explosion/IHLEntityFallingPile.java deleted file mode 100644 index 79973d8..0000000 --- a/ihl/explosion/IHLEntityFallingPile.java +++ /dev/null @@ -1,152 +0,0 @@ -package ihl.explosion; - -import ihl.utils.IHLUtils; -import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.network.play.server.S23PacketBlockChange; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.item.ItemExpireEvent; - -public class IHLEntityFallingPile extends EntityItem{ - - public IHLEntityFallingPile(World world) { - super(world); - } - - @Override - public void onUpdate() - { - ItemStack stack = this.getDataWatcher().getWatchableObjectItemStack(10); - if (stack != null && stack.getItem() != null) - { - if (stack.getItem().onEntityItemUpdate(this)) - { - return; - } - } - - if (this.getEntityItem() == null) - { - this.setDead(); - } - else - { - this.onEntityUpdate(); - - if (this.delayBeforeCanPickup > 0) - { - --this.delayBeforeCanPickup; - } - - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; - this.motionY -= 0.03999999910593033D; - this.noClip = this.func_145771_j(this.posX, (this.boundingBox.minY + this.boundingBox.maxY) / 2.0D, this.posZ); - this.moveEntity(this.motionX, this.motionY, this.motionZ); - boolean flag = (int)this.prevPosX != (int)this.posX || (int)this.prevPosY != (int)this.posY || (int)this.prevPosZ != (int)this.posZ; - - if (flag || this.ticksExisted % 25 == 0) - { - if (this.worldObj.getBlock(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)).getMaterial() == Material.lava) - { - this.motionY = 0.20000000298023224D; - this.motionX = (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F); - this.motionZ = (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F); - this.playSound("random.fizz", 0.4F, 2.0F + this.rand.nextFloat() * 0.4F); - } - - } - - this.motionX *= 0.98D; - this.motionY *= 0.98D; - this.motionZ *= 0.98D; - - if (this.onGround) - { - this.motionY *= -0.5D; - } - - ++this.age; - - ItemStack item = this.getEntityItem(); - - if (!this.worldObj.isRemote && - (this.age >= lifespan || this.onGround)) - { - if (item != null) - { - ItemExpireEvent event = new ItemExpireEvent(this, (item.getItem() == null ? 6000 : item.getItem().getEntityLifespan(item, worldObj))); - if (MinecraftForge.EVENT_BUS.post(event)) - { - lifespan += event.extraLife; - } - else - { - int x = (int)(this.boundingBox.minX); - int y = (int)(this.boundingBox.minY); - int z = (int)(this.boundingBox.minZ); - int i=1; - do - { - int[] xz = new int[] {0,0,1,0,-1,0}; - if(i