#152 - You no longer suffocate when in Blue Aerclouds

This commit is contained in:
Kino 2017-08-04 19:21:08 -04:00
parent 2016d58b53
commit 52474fbdb2

View file

@ -62,6 +62,8 @@ public class BlockAercloud extends Block implements IAetherMeta
@Override @Override
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity) public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity)
{ {
entity.fallDistance = 0;
if (((EnumCloudType)state.getValue(cloud_type)).equals(EnumCloudType.Blue)) if (((EnumCloudType)state.getValue(cloud_type)).equals(EnumCloudType.Blue))
{ {
if (entity instanceof EntityPlayer) if (entity instanceof EntityPlayer)
@ -114,8 +116,6 @@ public class BlockAercloud extends Block implements IAetherMeta
entity.motionY *= 0.005D; entity.motionY *= 0.005D;
} }
} }
entity.fallDistance = 0;
} }
@Override @Override
@ -191,6 +191,12 @@ public class BlockAercloud extends Block implements IAetherMeta
return !worldIn.getBlockState(pos.offset(side)).doesSideBlockRendering(worldIn, pos.offset(side), side.getOpposite()); return !worldIn.getBlockState(pos.offset(side)).doesSideBlockRendering(worldIn, pos.offset(side), side.getOpposite());
} }
@Override
public boolean isVisuallyOpaque()
{
return false;
}
@Override @Override
public boolean isOpaqueCube(IBlockState state) public boolean isOpaqueCube(IBlockState state)
{ {
@ -200,7 +206,7 @@ public class BlockAercloud extends Block implements IAetherMeta
@Override @Override
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World worldIn, BlockPos pos) public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World worldIn, BlockPos pos)
{ {
return ((EnumCloudType)state.getValue(cloud_type)).getMeta() != 1 ? new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.01D, 1.0D) : new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D); return ((EnumCloudType)state.getValue(cloud_type)).getMeta() != 1 ? new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.01D, 1.0D) : NULL_AABB;
} }
} }