#152 - You no longer suffocate when in Blue Aerclouds
This commit is contained in:
parent
2016d58b53
commit
52474fbdb2
1 changed files with 9 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue