From 57d01bf1e78d796fb537ff703007f374600f06a7 Mon Sep 17 00:00:00 2001 From: StevenRS11 Date: Wed, 17 Apr 2013 20:37:34 -0400 Subject: [PATCH] make door save you from falling to your death Signed-off-by: StevenRS11 --- StevenDimDoors/mod_pocketDim/dimHelper.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/StevenDimDoors/mod_pocketDim/dimHelper.java b/StevenDimDoors/mod_pocketDim/dimHelper.java index d0e6be4a..a57a8f96 100644 --- a/StevenDimDoors/mod_pocketDim/dimHelper.java +++ b/StevenDimDoors/mod_pocketDim/dimHelper.java @@ -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())