make door save you from falling to your death

Signed-off-by: StevenRS11 <stevenrs11@aol.com>
This commit is contained in:
StevenRS11 2013-04-17 20:37:34 -04:00
parent 988ba51b78
commit 57d01bf1e7

View file

@ -374,6 +374,15 @@ public class dimHelper extends DimensionManager
int playerYCoord=MathHelper.floor_double(entity.posY);
int playerZCoord=MathHelper.floor_double(entity.posZ);
if(!entity.worldObj.isBlockOpaqueCube(playerXCoord, playerYCoord-1,playerZCoord ))
{
entity.worldObj.setBlock(playerXCoord, playerYCoord-1, playerZCoord, mod_pocketDim.blockDimWallID);
}
if(Block.blocksList.length>=entity.worldObj.getBlockId(playerXCoord,playerYCoord+1,playerZCoord)&&!entity.worldObj.isAirBlock(playerXCoord,playerYCoord+1,playerZCoord))
{
if(Block.blocksList[entity.worldObj.getBlockId(playerXCoord,playerYCoord+1,playerZCoord)].isOpaqueCube())