Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
- // Jad home page: http://www.kpdus.com/jad.html
- // Decompiler options: packimports(3) braces deadcode fieldsfirst
- package net.minecraft.src;
- // Referenced classes of package net.minecraft.src:
- // Entity, MathHelper, World, Block,
- // BlockPistonMoving, BlockSand, NBTTagCompound
- public class ExplosivesPlusEntityFallingBlocks extends Entity
- {
- public int blockID;
- public int fallTime;
- public Entity nova;
- public ExplosivesPlusEntityFallingBlocks(World world)
- {
- super(world);
- fallTime = 0;
- }
- public ExplosivesPlusEntityFallingBlocks(World world, Entity bomb, double d, double d1, double d2)
- {
- super(world);
- fallTime = 0;
- preventEntitySpawning = true;
- setSize(0.98F, 0.98F);
- yOffset = height / 2.0F;
- setPosition(d + 0.5, d1, d2 + 0.5);
- motionX = 0.0D;
- motionY = 0.0D;
- motionZ = 0.0D;
- prevPosX = d;
- prevPosY = d1;
- prevPosZ = d2;
- nova = bomb;
- }
- protected boolean canTriggerWalking()
- {
- return false;
- }
- protected void entityInit()
- {
- }
- public boolean canBeCollidedWith()
- {
- return false;
- }
- public void onUpdate()
- {
- if(blockID == 0)
- {
- setDead();
- System.out.println("Fail Type 2");
- return;
- }
- prevPosX = posX;
- prevPosY = posY;
- prevPosZ = posZ;
- fallTime++;
- motionY -= mod_ExplosivesPlus.FallingBlockSpeed; // motionY -= 0.009999999105930328D;
- moveEntity(motionX, motionY, motionZ);
- motionX *= 0.98000001907348633D;
- motionY *= 0.98000001907348633D;
- motionZ *= 0.98000001907348633D;
- int i = MathHelper.floor_double(posX);
- int j = MathHelper.floor_double(posY);
- int k = MathHelper.floor_double(posZ);
- if(fallTime == 1 && worldObj.getBlockId(i, j, k) == blockID)
- {
- //worldObj.setBlockWithNotify(i, j, k, 0);
- } else
- if(fallTime == 1 && !mod_ExplosivesPlus.HighYieldNova)
- {
- setDead();
- System.out.println("Falling Block Entity Failed to Survive: Enable High Yield Novas for a Higher Yield");
- }
- if(onGround)
- {
- motionX *= 0.69999998807907104D;
- motionZ *= 0.69999998807907104D;
- motionY *= -0.5D;
- if(worldObj.getBlockId(i, j, k) != Block.pistonMoving.blockID)
- {
- setPosition(i, j, k);
- setDead();
- worldObj.setBlockWithNotify(i, j, k, blockID);
- }
- }
- }
- protected void writeEntityToNBT(NBTTagCompound nbttagcompound)
- {
- nbttagcompound.setByte("Tile", (byte)blockID);
- }
- protected void readEntityFromNBT(NBTTagCompound nbttagcompound)
- {
- blockID = nbttagcompound.getByte("Tile") & 0xff;
- }
- public float getShadowSize()
- {
- return 0.0F;
- }
- public World getWorld()
- {
- return worldObj;
- }
- @Override
- public boolean canBePushed(){
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement