Fixed door collisions
This commit is contained in:
parent
6cd9fe2760
commit
a6fdd29bbd
2 changed files with 4 additions and 6 deletions
|
@ -73,7 +73,7 @@ public class CommonProxy {
|
|||
if (tile instanceof TileEntityDimDoor) {
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
TileEntityDimDoor dimTile = (TileEntityDimDoor) tile;
|
||||
dimTile.openOrClosed = door.isDoorOnRift(world, pos) && door.isUpperDoorBlock(state);
|
||||
dimTile.openOrClosed = door.isDoorOnRift(world, pos) && !door.isUpperDoorBlock(state);
|
||||
dimTile.orientation = state.getValue(BlockDoor.FACING).rotateY();
|
||||
//if(state.getValue(BlockDoor.OPEN)) dimTile.orientation |= 4;
|
||||
dimTile.lockStatus = door.getLockStatus(world, pos);
|
||||
|
|
|
@ -34,9 +34,9 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
|||
public BaseDimDoor(Material material) {
|
||||
super(material);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, Entity entity) {
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity) {
|
||||
enterDimDoor(world, pos, entity);
|
||||
}
|
||||
|
||||
|
@ -112,14 +112,13 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
|||
updateAttachedTile(par1World, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) {
|
||||
IBlockState downState = worldIn.getBlockState(pos.down());
|
||||
if(downState.getBlock() == this) setDoorRotation(downState);
|
||||
else setDoorRotation(worldIn.getBlockState(pos));
|
||||
}
|
||||
|
||||
|
||||
private void setDoorRotation(IBlockState state) {
|
||||
float var2 = 0.1875F;
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F);
|
||||
|
@ -170,7 +169,6 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
|
||||
* their own) Args: x, y, z, neighbor blockID
|
||||
|
|
Loading…
Add table
Reference in a new issue