DoorTileEntity te = Door.getDoor(world, pos);
if (te == null)
return;
if (te.getDescriptor().hasCode())
return;
<BUG>if (te.getDescriptor().requireRedstone())
return;</BUG>
if (opening == te.isOpened())
return;
te.openOrCloseDoor();

DoorTileEntity te = Door.getDoor(world, pos);
if (te == null)
return;
if (te.getDescriptor().hasCode())
return;
if (te.getDescriptor().getRedstoneBehavior() == RedstoneBehavior.REDSTONE_ONLY)
return;
if (te.getDescriptor().getRedstoneBehavior() == RedstoneBehavior.REDSTONE_LOCK && te.isPowered())
return;
if (opening == te.isOpened())
return;
te.openOrCloseDoor();
